Skip to content

Commit 4563da6

Browse files
committed
document legacyness of sha1 and sha0
1 parent ca6950d commit 4563da6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,28 @@ Streamable SHA hashes in pure javascript.
1111
``` js
1212
var createHash = require('sha.js')
1313

14-
var sha1 = createHash('sha1')
1514
var sha256 = createHash('sha256')
1615
var sha512 = createHash'sha512')
1716

1817
var h = sha1.update('abc', 'utf8').digest('hex')
19-
console.log(h) //a9993e364706816aba3e25717850c26c9cd0d89d
18+
console.log(h) //ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
19+
20+
//LEGACY, do not use in new systems:
21+
var sha0 = createHash('sha')
22+
var sha1 = createHash('sha1')
23+
24+
2025
```
2126

2227
## supported hashes
2328

2429
sha.js currently implements:
2530

26-
* sha1
31+
2732
* sha256
2833
* sha512
34+
* sha1 (legacy, no not use in new systems)
35+
* sha (legacy, no not use in new systems)
2936

3037
## Note
3138

0 commit comments

Comments
 (0)