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

Function check

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

Source from the content-addressed store, hash-verified

84}
85
86function check(password, salt, iterations, keylen, digest) {
87 validateString(digest, 'digest');
88
89 password = getArrayBufferOrView(password, 'password');
90 salt = getArrayBufferOrView(salt, 'salt');
91 // OpenSSL uses a signed int to represent these values, so we are restricted
92 // to the 31-bit range here (which is plenty).
93 validateInt32(iterations, 'iterations', 1);
94 validateInt32(keylen, 'keylen', 0);
95 // Coerce -0 to +0.
96 keylen += 0;
97
98 return { password, salt, iterations, keylen, digest };
99}
100
101function validatePbkdf2DeriveBitsLength(length) {
102 if (length === null)

Callers 2

pbkdf2Function · 0.70
pbkdf2SyncFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…