MCPcopy Index your code
hub / github.com/nodejs/node / pbkdf2Sync

Function pbkdf2Sync

lib/internal/crypto/pbkdf2.js:67–84  ·  view source on GitHub ↗
(password, salt, iterations, keylen, digest)

Source from the content-addressed store, hash-verified

65}
66
67function pbkdf2Sync(password, salt, iterations, keylen, digest) {
68 ({ password, salt, iterations, keylen, digest } =
69 check(password, salt, iterations, keylen, digest));
70
71 const job = new PBKDF2Job(
72 kCryptoJobSync,
73 password,
74 salt,
75 iterations,
76 keylen,
77 digest);
78
79 const { 0: err, 1: result } = job.run();
80 if (err !== undefined)
81 throw err;
82
83 return Buffer.from(result);
84}
85
86function check(password, salt, iterations, keylen, digest) {
87 validateString(digest, 'digest');

Callers

nothing calls this directly

Calls 3

checkFunction · 0.70
runMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected