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

Function validateKeyLength

lib/internal/crypto/aes.js:69–72  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

67}
68
69function validateKeyLength(length) {
70 if (length !== 128 && length !== 192 && length !== 256)
71 throw lazyDOMException('Invalid key length', 'DataError');
72}
73
74function getVariant(name, length) {
75 switch (name) {

Callers 1

aesImportKeyFunction · 0.70

Calls 1

lazyDOMExceptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…