UNPKG

pbkdf2-password-hash

Version:
11 lines (8 loc) 298 B
const SEP = '$' function convert (passwordHash) { let [digest, iterations, keylen, salt, hash] = passwordHash.split(SEP) salt = Buffer.from(salt).toString('base64') const newPasswordHash = [digest, iterations, keylen, salt, hash].join(SEP) return newPasswordHash } export default convert