Skip to content

Instantly share code, notes, and snippets.

@calvinmetcalf
Created November 28, 2014 15:23
Show Gist options
  • Save calvinmetcalf/c259f12686aa7de31732 to your computer and use it in GitHub Desktop.
Save calvinmetcalf/c259f12686aa7de31732 to your computer and use it in GitHub Desktop.
function EVP_BytesToKey(password, len) {
var buff = md5(password);
var out = buff;
while (buff.length < len) {
buff = md5(buff + password);
out += buff;
}
return buff.slice(0, len);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment