ethers.js/packages/pbkdf2/lib.esm/index.js

10 lines
404 B
JavaScript
Raw Normal View History

"use strict";
import { pbkdf2Sync as _pbkdf2 } from "crypto";
import { arrayify, hexlify } from "@ethersproject/bytes";
function bufferify(value) {
return Buffer.from(arrayify(value));
}
export function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) {
return hexlify(_pbkdf2(bufferify(password), bufferify(salt), iterations, keylen, hashAlgorithm));
}
2020-07-13 15:03:56 +03:00
//# sourceMappingURL=index.js.map