MCPcopy Create free account
hub / github.com/nodejs/node / validatePbkdf2DeriveBitsLength

Function validatePbkdf2DeriveBitsLength

lib/internal/crypto/pbkdf2.js:101–110  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

99}
100
101function validatePbkdf2DeriveBitsLength(length) {
102 if (length === null)
103 throw lazyDOMException('length cannot be null', 'OperationError');
104
105 if (length % 8) {
106 throw lazyDOMException(
107 'length must be a multiple of 8',
108 'OperationError');
109 }
110}
111
112function pbkdf2DeriveBits(algorithm, baseKey, length) {
113 validatePbkdf2DeriveBitsLength(length);

Callers 1

pbkdf2DeriveBitsFunction · 0.85

Calls 1

lazyDOMExceptionFunction · 0.85

Tested by

no test coverage detected