Skip to content

Instantly share code, notes, and snippets.

@mohankumar-i2i
Created December 22, 2019 08:02
Show Gist options
  • Save mohankumar-i2i/6d26851bcb6d323bfcb6e53582c07920 to your computer and use it in GitHub Desktop.
Save mohankumar-i2i/6d26851bcb6d323bfcb6e53582c07920 to your computer and use it in GitHub Desktop.
const crypto = require("crypto");
const start = Date.now();
function logHashTime(label) {
crypto.pbkdf2("a", "b", 100000, 512, "sha512", () => {
console.log("Hash-"+label+": ", Date.now() - start);
});
}
logHashTime(1);
logHashTime(2);
logHashTime(3);
logHashTime(4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment