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

Function pbkdf2DeriveBits

lib/internal/crypto/pbkdf2.js:112–126  ·  view source on GitHub ↗
(algorithm, baseKey, length)

Source from the content-addressed store, hash-verified

110}
111
112function pbkdf2DeriveBits(algorithm, baseKey, length) {
113 validatePbkdf2DeriveBitsLength(length);
114 const { iterations, hash, salt } = algorithm;
115
116 if (length === 0)
117 return PromiseResolve(new ArrayBuffer(0));
118
119 return jobPromise(() => new PBKDF2Job(
120 kCryptoJobWebCrypto,
121 getCryptoKeyHandle(baseKey),
122 salt,
123 iterations,
124 length / 8,
125 normalizeHashName(hash.name)));
126}
127
128module.exports = {
129 pbkdf2,

Callers

nothing calls this directly

Calls 4

jobPromiseFunction · 0.85
getCryptoKeyHandleFunction · 0.85
normalizeHashNameFunction · 0.85

Tested by

no test coverage detected