Fixed RSA Sign and Verify character encodings

This commit is contained in:
n1474335 2024-10-23 14:03:09 +01:00
parent d635cca210
commit 895a929925
No known key found for this signature in database
GPG key ID: D15457B7B4AF3F37
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ class RSASign extends Operation {
const privateKey = forge.pki.decryptRsaPrivateKey(key, password);
// Generate message hash
const md = MD_ALGORITHMS[mdAlgo].create();
md.update(input, "utf8");
md.update(input, "raw");
// Sign message hash
const sig = privateKey.sign(md);
return sig;