Skip to content

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

License

Notifications You must be signed in to change notification settings

holepunchto/pw-to-ek

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published