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

Function hasCryptoKeyUsage

lib/internal/crypto/keys.js:1199–1201  ·  view source on GitHub ↗

* Returns whether a CryptoKey's `[[usages]]` contains `usage`. * @param {CryptoKey} key * @param {string} usage * @returns {boolean}

(key, usage)

Source from the content-addressed store, hash-verified

1197 * @returns {boolean}
1198 */
1199function hasCryptoKeyUsage(key, usage) {
1200 return hasUsage(getCryptoKeyUsagesMask(key), usage);
1201}
1202
1203/**
1204 * Returns the CryptoKey's cached canonical usages array for internal

Callers 11

deriveBitsImplFunction · 0.85
deriveKeyImplFunction · 0.85
wrapKeyImplFunction · 0.85
unwrapKeyImplFunction · 0.85
signVerifyFunction · 0.85
encryptImplFunction · 0.85
decryptImplFunction · 0.85
encapsulateBitsImplFunction · 0.85
encapsulateKeyImplFunction · 0.85
decapsulateBitsImplFunction · 0.85
decapsulateKeyImplFunction · 0.85

Calls 2

hasUsageFunction · 0.85
getCryptoKeyUsagesMaskFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…