1 Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified
2 version of [Devi Mandiri's port]
3 (https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js),
4 with some minor performance improvements. The code is copied verbatim (and
5 un-styled) from Devi's work.
7 This product includes software developed by Niels Provos.
11 ### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)`
13 Derive a cryptographic key of arbitrary length from a given password and salt,
14 using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and
17 See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for
22 * `pass`, a Uint8Array of length `passlen`
23 * `passlen`, an integer Number
24 * `salt`, a Uint8Array of length `saltlen`
25 * `saltlen`, an integer Number
26 * `key`, a Uint8Array of length `keylen`, will be filled with output
27 * `keylen`, an integer Number
28 * `rounds`, an integer Number, number of rounds of the PBKDF to run
30 ### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)`
32 Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as
33 part of the inner round function in the PBKDF.
37 * `sha2pass`, a Uint8Array of length 64
38 * `sha2salt`, a Uint8Array of length 64
39 * `out`, a Uint8Array of length 32, will be filled with output