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

Function hkdfSync

lib/internal/crypto/hkdf.js:127–142  ·  view source on GitHub ↗
(hash, key, salt, info, length)

Source from the content-addressed store, hash-verified

125}
126
127function hkdfSync(hash, key, salt, info, length) {
128 ({
129 hash,
130 key,
131 salt,
132 info,
133 length,
134 } = validateParameters(hash, key, salt, info, length));
135
136 const job = new HKDFJob(kCryptoJobSync, hash, key, salt, info, length);
137 const { 0: err, 1: bits } = job.run();
138 if (err !== undefined)
139 throw err;
140
141 return bits;
142}
143
144function validateHkdfDeriveBitsLength(length) {
145 if (length === null)

Callers 3

measureSyncFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected