1.1.0 • Published 10 months ago

pw-to-ek v1.1.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

pw-to-ek

Derive a secure encryption key from a password using sodium's scrypt implementation.

 const generate = require('pw-to-ek')
 const sodium = require('sodium-native')
 const salt = b4a.alloc(sodium.crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
 const key = await generate('password', salt)
 console.log(key) // 102 bytes Buffer
1.1.0

10 months ago

1.0.0

1 year ago