fix: lint errors

This commit is contained in:
Richard Schneider 2017-12-10 17:37:16 +13:00
parent ff4f656248
commit 06917f7aba

View File

@ -27,7 +27,7 @@ const NIST = {
* @private
*/
const hashName2Forge = {
'sha1': 'sha1',
sha1: 'sha1',
'sha2-256': 'sha256',
'sha2-512': 'sha512'
}
@ -135,8 +135,9 @@ class Keychain {
// Get the hashing alogorithm
const hashAlgorithm = hashName2Forge[opts.dek.hash]
if (!hashAlgorithm)
if (!hashAlgorithm) {
throw new Error(`dek.hash '${opts.dek.hash}' is unknown or not supported`)
}
// Create the derived encrypting key
let dek = forge.pkcs5.pbkdf2(