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

Function kmacGenerateKey

lib/internal/crypto/mac.js:84–103  ·  view source on GitHub ↗
(algorithm, extractable, usages)

Source from the content-addressed store, hash-verified

82}
83
84function kmacGenerateKey(algorithm, extractable, usages) {
85 const {
86 name,
87 length = {
88 __proto__: null,
89 KMAC128: 128,
90 KMAC256: 256,
91 }[name],
92 } = algorithm;
93
94 const usageSet = validateUsagesNotEmpty(
95 validateKeyUsages(usages, kUsages, name));
96
97 return jobPromise(() => new SecretKeyGenJob(
98 kCryptoJobWebCrypto,
99 length,
100 { name, length },
101 getUsagesMask(usageSet),
102 extractable));
103}
104
105function macImportKey(
106 format,

Callers

nothing calls this directly

Calls 4

validateUsagesNotEmptyFunction · 0.85
validateKeyUsagesFunction · 0.85
jobPromiseFunction · 0.85
getUsagesMaskFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…