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

Function mlKemDecapsulate

lib/internal/crypto/ml_kem.js:214–227  ·  view source on GitHub ↗
(decapsulationKey, ciphertext)

Source from the content-addressed store, hash-verified

212}
213
214function mlKemDecapsulate(decapsulationKey, ciphertext) {
215 if (getCryptoKeyType(decapsulationKey) !== 'private') {
216 throw lazyDOMException(`Key must be a private key`, 'InvalidAccessError');
217 }
218
219 return jobPromise(() => new KEMDecapsulateJob(
220 kCryptoJobWebCrypto,
221 getCryptoKeyHandle(decapsulationKey),
222 undefined,
223 undefined,
224 undefined,
225 undefined,
226 ciphertext));
227}
228
229module.exports = {
230 mlKemExportKey,

Callers

nothing calls this directly

Calls 4

getCryptoKeyTypeFunction · 0.85
lazyDOMExceptionFunction · 0.85
jobPromiseFunction · 0.85
getCryptoKeyHandleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…