Skip to content

Commit c60a2fa

Browse files
committedMar 2, 2017
fix(readme): updated to reflect new default hashAlgo
1 parent c094d9f commit c60a2fa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ cache.get(cachePath, 'my-thing').then(console.log)
150150
thingName: 'my'
151151
},
152152
digest: 'deadbeef',
153-
hashAlgorithm: 'sha256'
153+
hashAlgorithm: 'sha512'
154154
data: Buffer#<deadbeef>
155155
}
156156

157157
// Look up by digest
158158
cache.get.byDigest(cachePath, 'deadbeef', {
159-
hashAlgorithm: 'sha256'
159+
hashAlgorithm: 'sha512'
160160
}).then(console.log)
161161
// Output:
162162
Buffer#<deadbeef>
@@ -193,12 +193,12 @@ cache.get.stream(
193193
)
194194
// Outputs:
195195
metadata: { ... }
196-
hashAlgorithm: 'sha256'
196+
hashAlgorithm: 'sha512'
197197
digest: deadbeef
198198

199199
// Look up by digest
200200
cache.get.stream.byDigest(
201-
cachePath, 'deadbeef', { hashAlgorithm: 'sha256' }
201+
cachePath, 'deadbeef', { hashAlgorithm: 'sha512' }
202202
).pipe(
203203
fs.createWriteStream('./x.tgz')
204204
)
@@ -301,7 +301,7 @@ To control the hashing algorithm, use `opts.hashAlgorithm`.
301301

302302
##### `hashAlgorithm`
303303

304-
Default: 'sha256'
304+
Default: 'sha512'
305305

306306
Hashing algorithm to use when calculating the digest for inserted data. Can use
307307
any algorithm listed in `crypto.getHashes()` or `'omakase'`/`'お任せします'` to
@@ -397,7 +397,7 @@ reading/writing on the cache.
397397

398398
* `opts.uid` - uid to assign to cache and its contents
399399
* `opts.gid` - gid to assign to cache and its contents
400-
* `opts.hashAlgorithm` - defaults to `'sha256'`. Hash to use for content checks.
400+
* `opts.hashAlgorithm` - defaults to `'sha512'`. Hash to use for content checks.
401401

402402

403403
##### Example

0 commit comments

Comments
 (0)
Please sign in to comment.