(encapsulationKey)
| 198 | } |
| 199 | |
| 200 | function mlKemEncapsulate(encapsulationKey) { |
| 201 | if (getCryptoKeyType(encapsulationKey) !== 'public') { |
| 202 | throw lazyDOMException(`Key must be a public key`, 'InvalidAccessError'); |
| 203 | } |
| 204 | |
| 205 | return jobPromise(() => new KEMEncapsulateJob( |
| 206 | kCryptoJobWebCrypto, |
| 207 | getCryptoKeyHandle(encapsulationKey), |
| 208 | undefined, |
| 209 | undefined, |
| 210 | undefined, |
| 211 | undefined)); |
| 212 | } |
| 213 | |
| 214 | function mlKemDecapsulate(decapsulationKey, ciphertext) { |
| 215 | if (getCryptoKeyType(decapsulationKey) !== 'private') { |
nothing calls this directly
no test coverage detected
searching dependent graphs…