Fix streaming/signed encryption with config.integrity_protect=false
This commit is contained in:
parent
3edc6e7501
commit
40360b4955
|
@ -109,7 +109,7 @@ SymmetricallyEncrypted.prototype.encrypt = async function (algo, key) {
|
||||||
const prefix = await crypto.getPrefixRandom(algo);
|
const prefix = await crypto.getPrefixRandom(algo);
|
||||||
const FRE = await crypto.cfb.encrypt(algo, key, prefix, new Uint8Array(crypto.cipher[algo].blockSize));
|
const FRE = await crypto.cfb.encrypt(algo, key, prefix, new Uint8Array(crypto.cipher[algo].blockSize));
|
||||||
const ciphertext = await crypto.cfb.encrypt(algo, key, data, FRE.subarray(2));
|
const ciphertext = await crypto.cfb.encrypt(algo, key, data, FRE.subarray(2));
|
||||||
this.encrypted = util.concatUint8Array([FRE, ciphertext]);
|
this.encrypted = util.concat([FRE, ciphertext]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user