Closed philcockfield closed 1 year ago
@trevor-vaughan
I've added a sha256
and sha512
options.
export type HashAlgorithm = 'sha1' | 'sha256' | 'sha512';
I wonder, are there any other baseline/standard algorithms you'd like to see included?
const cache1 = new FileSystemCache(); // ← default: "sha1"
const cache2 = new FileSystemCache({ hash: 'sha256' });
const cache3 = new FileSystemCache({ hash: 'sha512' });
Please let me know if you want any others, and I'll get them in and tested, and then bump this feature release over to NPM. Thanks!
@philcockfield Ideally, you'd pull the available hashes out of the underlying installation and allow for any from that list.
crypto = require('crypto')
hashes = crypto.getHashes()
that's better @trevor-vaughan - cheers!
Published as 2.4.0
Issue: #23