1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

add support for md5 hash crypto function

This commit is contained in:
Kyle Spearrin
2018-07-30 23:29:30 -04:00
parent 13769a7fcb
commit 2045e7047a
5 changed files with 22 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ export class NodeCryptoFunctionService implements CryptoFunctionService {
});
}
hash(value: string | ArrayBuffer, algorithm: 'sha1' | 'sha256' | 'sha512'): Promise<ArrayBuffer> {
hash(value: string | ArrayBuffer, algorithm: 'sha1' | 'sha256' | 'sha512' | 'md5'): Promise<ArrayBuffer> {
const nodeValue = this.toNodeValue(value);
const hash = crypto.createHash(algorithm);
hash.update(nodeValue);