mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-05-03 14:32:18 +00:00
fix: lint errors
This commit is contained in:
parent
ff4f656248
commit
06917f7aba
@ -27,7 +27,7 @@ const NIST = {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
const hashName2Forge = {
|
const hashName2Forge = {
|
||||||
'sha1': 'sha1',
|
sha1: 'sha1',
|
||||||
'sha2-256': 'sha256',
|
'sha2-256': 'sha256',
|
||||||
'sha2-512': 'sha512'
|
'sha2-512': 'sha512'
|
||||||
}
|
}
|
||||||
@ -135,8 +135,9 @@ class Keychain {
|
|||||||
|
|
||||||
// Get the hashing alogorithm
|
// Get the hashing alogorithm
|
||||||
const hashAlgorithm = hashName2Forge[opts.dek.hash]
|
const hashAlgorithm = hashName2Forge[opts.dek.hash]
|
||||||
if (!hashAlgorithm)
|
if (!hashAlgorithm) {
|
||||||
throw new Error(`dek.hash '${opts.dek.hash}' is unknown or not supported`)
|
throw new Error(`dek.hash '${opts.dek.hash}' is unknown or not supported`)
|
||||||
|
}
|
||||||
|
|
||||||
// Create the derived encrypting key
|
// Create the derived encrypting key
|
||||||
let dek = forge.pkcs5.pbkdf2(
|
let dek = forge.pkcs5.pbkdf2(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user