Skip to content

Commit d26fd50

Browse files
committed
readme
1 parent 041c148 commit d26fd50

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

README.md

+9-18
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,17 @@ import { scrypt, scryptAsync } from '@noble/hashes/scrypt';
6464
import * as utils from '@noble/hashes/utils'; // bytesToHex, hexToBytes, etc
6565
```
6666
67-
- [Implementations](#implementations)
68-
- [sha2: sha256, sha384, sha512](#sha2-sha256-sha384-sha512-and-others)
69-
- [sha3: FIPS, SHAKE, Keccak](#sha3-fips-shake-keccak)
70-
- [sha3-addons: cSHAKE, KMAC, K12, M14, TurboSHAKE](#sha3-addons-cshake-kmac-k12-m14-turboshake)
71-
- [ripemd160](#ripemd160) | [blake, blake2b, blake2s, blake3](#blake-blake2b-blake2s-blake3) | [sha1: legacy hash](#sha1-legacy-hash)
72-
- MACs: [hmac](#hmac) (also sha3-addons [kmac](#sha3-addons-cshake-kmac-k12-m14-turboshake), blake3 [key mode](#blake2b-blake2s-blake3))
73-
- KDFs: [hkdf](#hkdf) | [pbkdf2](#pbkdf2) | [scrypt](#scrypt) | [argon2](#argon2)
74-
- [utils](#utils)
67+
- [sha2: sha256, sha384, sha512](#sha2-sha256-sha384-sha512-and-others)
68+
- [sha3: FIPS, SHAKE, Keccak](#sha3-fips-shake-keccak)
69+
- [sha3-addons: cSHAKE, KMAC, K12, M14, TurboSHAKE](#sha3-addons-cshake-kmac-k12-m14-turboshake)
70+
- [ripemd160](#ripemd160) | [blake, blake2b, blake2s, blake3](#blake-blake2b-blake2s-blake3) | [sha1](#sha1)
71+
- MACs: [hmac](#hmac) (also sha3-addons [kmac](#sha3-addons-cshake-kmac-k12-m14-turboshake), blake3 [key mode](#blake2b-blake2s-blake3))
72+
- KDFs: [hkdf](#hkdf) | [pbkdf2](#pbkdf2) | [scrypt](#scrypt) | [argon2](#argon2)
73+
- [utils](#utils)
7574
- [Security](#security) | [Speed](#speed) | [Contributing & testing](#contributing--testing) | [License](#license)
7675
7776
### Implementations
7877
79-
```ts
80-
// function hash(message: Uint8Array | string): Uint8Array;
81-
hash(new Uint8Array([1, 3]));
82-
hash('string'); // == hash(new TextEncoder().encode('string'));
83-
// prettier-ignore
84-
hash.create().update(new Uint8Array([1, 3])).digest();
85-
```
86-
8778
Hash functions:
8879
8980
- receive & return `Uint8Array`
@@ -235,9 +226,9 @@ const h11_kdf = blake3('abc', { context: 'application name' });
235226
- Blake2 is popular fast hash. blake2b focuses on 64-bit platforms while blake2s is for 8-bit to 32-bit ones. See [RFC 7693](https://datatracker.ietf.org/doc/html/rfc7693), [Website](https://www.blake2.net)
236227
- Blake3 is faster, reduced-round blake2. See [Website & specs](https://blake3.io)
237228
238-
#### sha1: legacy hash
229+
#### sha1
239230
240-
SHA1 was cryptographically broken, however, it was not broken for cases like HMAC.
231+
SHA1 is legacy hash, which was cryptographically broken, however, it was not broken for cases like HMAC.
241232
242233
See [RFC4226 B.2](https://datatracker.ietf.org/doc/html/rfc4226#appendix-B.2).
243234

0 commit comments

Comments
 (0)