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

Function getAlgorithmName

lib/internal/crypto/aes.js:59–67  ·  view source on GitHub ↗
(name, length)

Source from the content-addressed store, hash-verified

57};
58
59function getAlgorithmName(name, length) {
60 switch (name) {
61 case 'AES-CBC': return `A${length}CBC`;
62 case 'AES-CTR': return `A${length}CTR`;
63 case 'AES-GCM': return `A${length}GCM`;
64 case 'AES-KW': return `A${length}KW`;
65 case 'AES-OCB': return `A${length}OCB`;
66 }
67}
68
69function validateKeyLength(length) {
70 if (length !== 128 && length !== 192 && length !== 256)

Callers 1

aesImportKeyFunction · 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…