mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-13 17:55:27 -04:00
Merge c32b7713c0
into c57556f49f
This commit is contained in:
commit
50df2ca5e1
1 changed files with 1 additions and 2 deletions
|
@ -72,9 +72,8 @@ class RSAEncrypt extends Operation {
|
|||
// Load public key
|
||||
const pubKey = forge.pki.publicKeyFromPem(pemKey);
|
||||
// https://github.com/digitalbazaar/forge/issues/465#issuecomment-271097600
|
||||
const plaintextBytes = forge.util.encodeUtf8(input);
|
||||
// Encrypt message
|
||||
const eMsg = pubKey.encrypt(plaintextBytes, scheme, {md: MD_ALGORITHMS[md].create()});
|
||||
const eMsg = pubKey.encrypt(input, scheme, {md: MD_ALGORITHMS[md].create()});
|
||||
return eMsg;
|
||||
} catch (err) {
|
||||
if (err.message === "RSAES-OAEP input message length is too long.") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue