(mode, key, data, algorithm)
| 157 | } |
| 158 | |
| 159 | function 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 | |
| 174 | function aesCipher(mode, key, data, algorithm) { |
| 175 | switch (algorithm.name) { |
no test coverage detected