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

Function asyncAesOcbCipher

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

Source from the content-addressed store, hash-verified

157}
158
159function asyncAesOcbCipher(mode, key, data, algorithm) {
160 const { tagLength = 128 } = algorithm;
161 const tagByteLength = tagLength / 8;
162
163 return jobPromise(() => new AESCipherJob(
164 kCryptoJobWebCrypto,
165 mode,
166 getCryptoKeyHandle(key),
167 data,
168 getVariant('AES-OCB', getCryptoKeyAlgorithm(key).length),
169 algorithm.iv,
170 tagByteLength,
171 algorithm.additionalData));
172}
173
174function aesCipher(mode, key, data, algorithm) {
175 switch (algorithm.name) {

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