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

Function rsaOaepCipher

lib/internal/crypto/rsa.js:81–99  ·  view source on GitHub ↗
(mode, key, data, algorithm)

Source from the content-addressed store, hash-verified

79}
80
81function rsaOaepCipher(mode, key, data, algorithm) {
82 validateRsaOaepAlgorithm(algorithm);
83
84 const type = mode === kWebCryptoCipherEncrypt ? 'public' : 'private';
85 if (getCryptoKeyType(key) !== type) {
86 throw lazyDOMException(
87 'The requested operation is not valid for the provided key',
88 'InvalidAccessError');
89 }
90
91 return jobPromise(() => new RSACipherJob(
92 kCryptoJobWebCrypto,
93 mode,
94 getCryptoKeyHandle(key),
95 data,
96 kKeyVariantRSA_OAEP,
97 normalizeHashName(getCryptoKeyAlgorithm(key).hash.name),
98 algorithm.label));
99}
100
101function rsaKeyGenerate(
102 algorithm,

Callers

nothing calls this directly

Calls 7

validateRsaOaepAlgorithmFunction · 0.85
getCryptoKeyTypeFunction · 0.85
lazyDOMExceptionFunction · 0.85
jobPromiseFunction · 0.85
getCryptoKeyHandleFunction · 0.85
normalizeHashNameFunction · 0.85
getCryptoKeyAlgorithmFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…