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

Function validateMaxBufferLength

lib/internal/crypto/util.js:545–551  ·  view source on GitHub ↗
(data, name, max = kMaxBufferLength)

Source from the content-addressed store, hash-verified

543}
544
545function validateMaxBufferLength(data, name, max = kMaxBufferLength) {
546 if (data.byteLength > max) {
547 throw lazyDOMException(
548 `${name} must be at most ${max} bytes`,
549 'OperationError');
550 }
551}
552
553/**
554 * Converts a bit length to the number of bytes needed to contain it.

Callers 5

cipherOrWrapFunction · 0.85
webidl.jsFile · 0.85
asyncDigestFunction · 0.85
validateRsaOaepAlgorithmFunction · 0.85

Calls 1

lazyDOMExceptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…