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

Function validateByteLength

lib/internal/crypto/webidl.js:42–48  ·  view source on GitHub ↗
(buf, name, target)

Source from the content-addressed store, hash-verified

40} = require('internal/webidl');
41
42function validateByteLength(buf, name, target) {
43 if (buf.byteLength !== target) {
44 throw lazyDOMException(
45 `${name} must contain exactly ${target} bytes`,
46 'OperationError');
47 }
48}
49
50function AESLengthValidator(V, dict) {
51 if (V !== 128 && V !== 192 && V !== 256)

Callers 1

webidl.jsFile · 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…