MCPcopy Create free account
hub / github.com/apache/cloudstack / importKey

Method importKey

systemvm/agent/noVNC/core/crypto/rsa.js:60–67  ·  view source on GitHub ↗
(key, _algorithm, extractable, keyUsages)

Source from the content-addressed store, hash-verified

58 }
59
60 static async importKey(key, _algorithm, extractable, keyUsages) {
61 if (keyUsages.length !== 1 || keyUsages[0] !== "encrypt") {
62 throw new Error("only support importing RSA public key");
63 }
64 const cipher = new RSACipher;
65 await cipher._importKey(key, extractable);
66 return cipher;
67 }
68
69 async _importKey(key, extractable) {
70 const n = key.n;

Callers 6

setKeyMethod · 0.45
genDESMethod · 0.45
_decrypt_passwordMethod · 0.45

Calls 1

_importKeyMethod · 0.95

Tested by 1

_decrypt_passwordMethod · 0.36