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

Function aesCipher

lib/internal/crypto/aes.js:174–182  ·  view source on GitHub ↗
(mode, key, data, algorithm)

Source from the content-addressed store, hash-verified

172}
173
174function aesCipher(mode, key, data, algorithm) {
175 switch (algorithm.name) {
176 case 'AES-CTR': return asyncAesCtrCipher(mode, key, data, algorithm);
177 case 'AES-CBC': return asyncAesCbcCipher(mode, key, data, algorithm);
178 case 'AES-GCM': return asyncAesGcmCipher(mode, key, data, algorithm);
179 case 'AES-OCB': return asyncAesOcbCipher(mode, key, data, algorithm);
180 case 'AES-KW': return asyncAesKwCipher(mode, key, data);
181 }
182}
183
184function aesGenerateKey(algorithm, extractable, usages) {
185 const { name, length } = algorithm;

Calls 5

asyncAesCtrCipherFunction · 0.85
asyncAesCbcCipherFunction · 0.85
asyncAesGcmCipherFunction · 0.85
asyncAesOcbCipherFunction · 0.85
asyncAesKwCipherFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…