(mode, key, data, algorithm)
| 172 | } |
| 173 | |
| 174 | function 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 | |
| 184 | function aesGenerateKey(algorithm, extractable, usages) { |
| 185 | const { name, length } = algorithm; |
no test coverage detected
searching dependent graphs…