2019-08-25 09:39:20 +03:00
|
|
|
"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
|