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

Function asyncAesGcmCipher

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

Source from the content-addressed store, hash-verified

142}
143
144function asyncAesGcmCipher(mode, key, data, algorithm) {
145 const { tagLength = 128 } = algorithm;
146 const tagByteLength = tagLength / 8;
147
148 return jobPromise(() => new AESCipherJob(
149 kCryptoJobWebCrypto,
150 mode,
151 getCryptoKeyHandle(key),
152 data,
153 getVariant('AES-GCM', getCryptoKeyAlgorithm(key).length),
154 algorithm.iv,
155 tagByteLength,
156 algorithm.additionalData));
157}
158
159function asyncAesOcbCipher(mode, key, data, algorithm) {
160 const { tagLength = 128 } = algorithm;

Callers 1

aesCipherFunction · 0.85

Calls 4

jobPromiseFunction · 0.85
getCryptoKeyHandleFunction · 0.85
getVariantFunction · 0.85
getCryptoKeyAlgorithmFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…