MCPcopy Index your code
hub / github.com/travist/jsencrypt / decrypt

Method decrypt

src/JSEncrypt.ts:88–95  ·  view source on GitHub ↗

* Proxy method for RSAKey object's decrypt, decrypt the string using the private * components of the rsa key object. Note that if the object was not set will be created * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor * @param {string} str b

(str: string)

Source from the content-addressed store, hash-verified

86 * @public
87 */
88 public decrypt(str: string) {
89 // Return the decrypted string.
90 try {
91 return this.getKey().decrypt(b64tohex(str));
92 } catch (ex) {
93 return false;
94 }
95 }
96
97 /**
98 * Proxy method for RSAKey object's encrypt, encrypt the string using the public

Callers 15

runExamplesTestsFunction · 0.95
runExamplesTestsFunction · 0.95
runBasicTestFunction · 0.95
testNodeJSCompatibilityFunction · 0.95
JSEncrypt.jsFile · 0.45
test.examples.jsFile · 0.45
decryptDataMethod · 0.45
verifyDocumentMethod · 0.45
validateLicenseMethod · 0.45

Calls 2

getKeyMethod · 0.95
b64tohexFunction · 0.90

Tested by

no test coverage detected