@@ -150,13 +150,13 @@ cache.get(cachePath, 'my-thing').then(console.log)
150
150
thingName: ' my'
151
151
},
152
152
digest: ' deadbeef' ,
153
- hashAlgorithm: ' sha256 '
153
+ hashAlgorithm: ' sha512 '
154
154
data: Buffer#< deadbeef>
155
155
}
156
156
157
157
// Look up by digest
158
158
cache .get .byDigest (cachePath, ' deadbeef' , {
159
- hashAlgorithm: ' sha256 '
159
+ hashAlgorithm: ' sha512 '
160
160
}).then (console .log )
161
161
// Output:
162
162
Buffer#< deadbeef>
@@ -193,12 +193,12 @@ cache.get.stream(
193
193
)
194
194
// Outputs:
195
195
metadata: { ... }
196
- hashAlgorithm: ' sha256 '
196
+ hashAlgorithm: ' sha512 '
197
197
digest: deadbeef
198
198
199
199
// Look up by digest
200
200
cache .get .stream .byDigest (
201
- cachePath, ' deadbeef' , { hashAlgorithm: ' sha256 ' }
201
+ cachePath, ' deadbeef' , { hashAlgorithm: ' sha512 ' }
202
202
).pipe (
203
203
fs .createWriteStream (' ./x.tgz' )
204
204
)
@@ -301,7 +301,7 @@ To control the hashing algorithm, use `opts.hashAlgorithm`.
301
301
302
302
##### ` hashAlgorithm `
303
303
304
- Default: 'sha256 '
304
+ Default: 'sha512 '
305
305
306
306
Hashing algorithm to use when calculating the digest for inserted data. Can use
307
307
any algorithm listed in ` crypto.getHashes() ` or ` 'omakase' ` /` 'お任せします' ` to
@@ -397,7 +397,7 @@ reading/writing on the cache.
397
397
398
398
* ` opts.uid ` - uid to assign to cache and its contents
399
399
* ` 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.
401
401
402
402
403
403
##### Example
0 commit comments