MCPcopy Create free account
hub / github.com/nodejs/node / c20pCipher

Function c20pCipher

lib/internal/crypto/chacha20_poly1305.js:38–46  ·  view source on GitHub ↗
(mode, key, data, algorithm)

Source from the content-addressed store, hash-verified

36}
37
38function c20pCipher(mode, key, data, algorithm) {
39 return jobPromise(() => new ChaCha20Poly1305CipherJob(
40 kCryptoJobWebCrypto,
41 mode,
42 getCryptoKeyHandle(key),
43 data,
44 algorithm.iv,
45 algorithm.additionalData));
46}
47
48function c20pGenerateKey(algorithm, extractable, usages) {
49 const { name } = algorithm;

Callers

nothing calls this directly

Calls 2

jobPromiseFunction · 0.85
getCryptoKeyHandleFunction · 0.85

Tested by

no test coverage detected