\href{https://www.npmjs.org/package/evp_bytestokey}{\texttt{ }} \href{https://travis-ci.org/crypto-browserify/EVP_BytesToKey}{\texttt{ }} \href{https://david-dm.org/crypto-browserify/EVP_BytesToKey\#info=dependencies}{\texttt{ }}

\href{https://github.com/feross/standard}{\texttt{ }}

The insecure \href{https://wiki.openssl.org/index.php/Manual:EVP_BytesToKey(3)}{\texttt{ key derivation algorithm from Open\+SSL.}}

{\bfseries{WARNING\+: DO NOT USE, except for compatibility reasons.}}

MD5 is insecure.

Use at least {\ttfamily scrypt} or {\ttfamily pbkdf2-\/hmac-\/sha256} instead.\hypertarget{md_sfcode_node_modules_evp_bytestokey_README_autotoc_md9356}{}\doxysection{API}\label{md_sfcode_node_modules_evp_bytestokey_README_autotoc_md9356}
{\ttfamily EVP\+\_\+\+Bytes\+To\+Key(password, salt, key\+Len, iv\+Len)}


\begin{DoxyItemize}
\item {\ttfamily password} -\/ {\ttfamily Buffer}, password used to derive the key data.
\item {\ttfamily salt} -\/ 8 byte {\ttfamily Buffer} or {\ttfamily null}, salt is used as a salt in the derivation.
\item {\ttfamily key\+Bits} -\/ {\ttfamily number}, key length in {\bfseries{bits}}.
\item {\ttfamily iv\+Len} -\/ {\ttfamily number}, iv length in bytes.
\end{DoxyItemize}

{\itshape Returns}\+: {\ttfamily \{ key\+: Buffer, iv\+: Buffer \}}\hypertarget{md_sfcode_node_modules_evp_bytestokey_README_autotoc_md9357}{}\doxysection{Examples}\label{md_sfcode_node_modules_evp_bytestokey_README_autotoc_md9357}
MD5 with {\ttfamily aes-\/256-\/cbc}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{const crypto = require('crypto')}
\DoxyCodeLine{const EVP\_BytesToKey = require('evp\_bytestokey')}
\DoxyCodeLine{}
\DoxyCodeLine{const result = EVP\_BytesToKey(}
\DoxyCodeLine{  'my-\/secret-\/password',}
\DoxyCodeLine{  null,}
\DoxyCodeLine{  32,}
\DoxyCodeLine{  16}
\DoxyCodeLine{)}
\DoxyCodeLine{// =>}
\DoxyCodeLine{// \{ key: <Buffer e3 4f 96 f3 86 24 82 7c c2 5d ff 23 18 6f 77 72 54 45 7f 49 d4 be 4b dd 4f 6e 1b cc 92 a4 27 33>,}
\DoxyCodeLine{//   iv: <Buffer 85 71 9a bf ae f4 1e 74 dd 46 b6 13 79 56 f5 5b> \}}
\DoxyCodeLine{}
\DoxyCodeLine{const cipher = crypto.createCipheriv('aes-\/256-\/cbc', result.key, result.iv) }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_evp_bytestokey_README_autotoc_md9358}{}\doxysection{LICENSE \mbox{[}\+MIT\mbox{]}(\+LICENSE)}\label{md_sfcode_node_modules_evp_bytestokey_README_autotoc_md9358}
