Port of the Open\+BSD {\ttfamily bcrypt\+\_\+pbkdf} function to pure Javascript. {\ttfamily npm}-\/ified version of \href{https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js}{\texttt{ Devi Mandiri\textquotesingle{}s port}}, with some minor performance improvements. The code is copied verbatim (and un-\/styled) from Devi\textquotesingle{}s work.

This product includes software developed by Niels Provos.\hypertarget{md_sfcode_node_modules_bcrypt_pbkdf_README_autotoc_md3916}{}\doxysubsection{API}\label{md_sfcode_node_modules_bcrypt_pbkdf_README_autotoc_md3916}
\hypertarget{md_sfcode_node_modules_bcrypt_pbkdf_README_autotoc_md3917}{}\doxysubsubsection{$<$tt$>$bcrypt\+\_\+pbkdf.\+pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)$<$/tt$>$}\label{md_sfcode_node_modules_bcrypt_pbkdf_README_autotoc_md3917}
Derive a cryptographic key of arbitrary length from a given password and salt, using the Open\+BSD {\ttfamily bcrypt\+\_\+pbkdf} function. This is a combination of Blowfish and SHA-\/512.

See \href{http://www.tedunangst.com/flak/post/bcrypt-pbkdf}{\texttt{ this article}} for further information.

Parameters\+:


\begin{DoxyItemize}
\item {\ttfamily pass}, a Uint8\+Array of length {\ttfamily passlen}
\item {\ttfamily passlen}, an integer Number
\item {\ttfamily salt}, a Uint8\+Array of length {\ttfamily saltlen}
\item {\ttfamily saltlen}, an integer Number
\item {\ttfamily key}, a Uint8\+Array of length {\ttfamily keylen}, will be filled with output
\item {\ttfamily keylen}, an integer Number
\item {\ttfamily rounds}, an integer Number, number of rounds of the PBKDF to run
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_bcrypt_pbkdf_README_autotoc_md3918}{}\doxysubsubsection{$<$tt$>$bcrypt\+\_\+pbkdf.\+hash(sha2pass, sha2salt, out)$<$/tt$>$}\label{md_sfcode_node_modules_bcrypt_pbkdf_README_autotoc_md3918}
Calculate a Blowfish hash, given SHA2-\/512 output of a password and salt. Used as part of the inner round function in the PBKDF.

Parameters\+:


\begin{DoxyItemize}
\item {\ttfamily sha2pass}, a Uint8\+Array of length 64
\item {\ttfamily sha2salt}, a Uint8\+Array of length 64
\item {\ttfamily out}, a Uint8\+Array of length 32, will be filled with output
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_bcrypt_pbkdf_README_autotoc_md3919}{}\doxysubsection{License}\label{md_sfcode_node_modules_bcrypt_pbkdf_README_autotoc_md3919}
This source form is a 1\+:1 port from the Open\+BSD {\ttfamily blowfish.\+c} and {\ttfamily bcrypt\+\_\+pbkdf.\+c}. As a result, it retains the original copyright and license. The two files are under slightly different (but compatible) licenses, and are here combined in one file. For each of the full license texts see {\ttfamily LICENSE}. 