Fix Ciphersaber2 key concatenation

The concat method does not handle typed arrays as arguments.
This commit is contained in:
zb3 2024-04-01 18:40:00 +02:00
parent df140b5098
commit 52709f0ecb
2 changed files with 7 additions and 4 deletions

View file

@ -4,7 +4,7 @@
* @license Apache-2.0
*/
export function encode(tempIVP, key, rounds, input) {
const ivp = new Uint8Array(key.concat(tempIVP));
const ivp = new Uint8Array([...key, ...tempIVP]);
const state = new Array(256).fill(0);
let j = 0, i = 0;
const result = [];