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

Function importJwkKey

lib/internal/crypto/webcrypto_util.js:208–218  ·  view source on GitHub ↗
(isPublic, keyData)

Source from the content-addressed store, hash-verified

206}
207
208function importJwkKey(isPublic, keyData) {
209 const handle = new KeyObjectHandle();
210 const keyType = isPublic ? kKeyTypePublic : kKeyTypePrivate;
211 try {
212 handle.init(keyType, keyData, kKeyFormatJWK, null, null, null);
213 } catch (err) {
214 throw lazyDOMException(
215 'Invalid keyData', { name: 'DataError', cause: err });
216 }
217 return handle;
218}
219
220function importRawKey(isPublic, keyData, format, name, namedCurve) {
221 const handle = new KeyObjectHandle();

Callers 5

mlDsaImportKeyFunction · 0.85
mlKemImportKeyFunction · 0.85
ecImportKeyFunction · 0.85
cfrgImportKeyFunction · 0.85
rsaImportKeyFunction · 0.85

Calls 2

lazyDOMExceptionFunction · 0.85
initMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…