chore(i18n,curriculum): update translations (#44255)
This commit is contained in:
@ -8,27 +8,27 @@ dashedName: sha-256
|
||||
|
||||
# --description--
|
||||
|
||||
The `SHA-2` family is a stronger alternative to `SHA-1`. The main difference between them is the length of the hash. Meaning `SHA-1` provides a shorter code with fewer possibilities for unique combinations. `SHA-2` or `SHA-256` creates a longer and thus more complex hash with more possibilities.
|
||||
`SHA-2` 家族是比 `SHA-1` 更強大的替代。 兩者最主要的不同是散列的長度。 即 `SHA-1` 提供了更短的編碼,也意味着組合的唯一性概率更低。 `SHA-2` 或 `SHA-256` 創建了較長的散列,從而增加了唯一性的概率。
|
||||
|
||||
# --instructions--
|
||||
|
||||
Research implemenation details and write a function that takes a string as the parameter and returns a hash using `SHA-256`
|
||||
研究實現細節並編寫一個函數,該函數以字符串爲參數並使用 `SHA-256` 返回哈希值
|
||||
|
||||
# --hints--
|
||||
|
||||
`SHA256` should be a function.
|
||||
`SHA256` 應該是一個函數。
|
||||
|
||||
```js
|
||||
assert(typeof SHA256 === 'function');
|
||||
```
|
||||
|
||||
`SHA256("Rosetta code")` should return a string.
|
||||
`SHA256("Rosetta code")` 應該返回一個字符串。
|
||||
|
||||
```js
|
||||
assert(typeof SHA256('Rosetta code') === 'string');
|
||||
```
|
||||
|
||||
`SHA256("Rosetta code")` should return `"764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf"`.
|
||||
`SHA256("Rosetta code")` 應該返回 `"764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf"`。
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
@ -37,7 +37,7 @@ assert.equal(
|
||||
);
|
||||
```
|
||||
|
||||
`SHA256("SHA-256 Hash")` should return `"bee8c0cabdcf8c7835f40217dd35a8b0dba9134520e633f1c57285f35ca7ee3e"`.
|
||||
`SHA256("SHA-256 Hash")` 應該返回 `"bee8c0cabdcf8c7835f40217dd35a8b0dba9134520e633f1c57285f35ca7ee3e"`。
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
@ -46,7 +46,7 @@ assert.equal(
|
||||
);
|
||||
```
|
||||
|
||||
`SHA256("implementation")` should return `"da31012c40330e7e21538e7dd57503b16e8a0839159e96137090cccc9910b171"`.
|
||||
`SHA256("implementation")` 應該返回 `"da31012c40330e7e21538e7dd57503b16e8a0839159e96137090cccc9910b171"`。
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
@ -55,7 +55,7 @@ assert.equal(
|
||||
);
|
||||
```
|
||||
|
||||
`SHA256("algorithm")` should return `"b1eb2ec8ac9f31ff7918231e67f96e6deda83a9ff33ed2c67443f1df81e5ed14"`.
|
||||
`SHA256("algorithm")` 應該返回 `"b1eb2ec8ac9f31ff7918231e67f96e6deda83a9ff33ed2c67443f1df81e5ed14"`。
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
@ -64,7 +64,7 @@ assert.equal(
|
||||
);
|
||||
```
|
||||
|
||||
`SHA256("language")` should return `"a4ef304ba42a200bafd78b046e0869af9183f6eee5524aead5dcb3a5ab5f8f3f"`.
|
||||
`SHA256("language")` 應該返回 `"a4ef304ba42a200bafd78b046e0869af9183f6eee5524aead5dcb3a5ab5f8f3f"`
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
|
Reference in New Issue
Block a user