mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-03-09 18:32:59 +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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user