mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-06-17 11:46:38 +00:00
Fix CFB decryption performance in JS fallback for ciphers other than AES (#1679)
This issue affected non-AES ciphers (legacy), such as Cast5, in Node 18+ and in browser.
This commit is contained in:
parent
5d02e3a03e
commit
2ba8229d23
@ -119,7 +119,7 @@ export async function decrypt(algo, key, ciphertext, iv) {
|
||||
let j = 0;
|
||||
while (chunk ? ct.length >= block_size : ct.length) {
|
||||
const decblock = cipherfn.encrypt(blockp);
|
||||
blockp = ct;
|
||||
blockp = ct.subarray(0, block_size);
|
||||
for (i = 0; i < block_size; i++) {
|
||||
plaintext[j++] = blockp[i] ^ decblock[i];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user