Return generic error on PKESK checksum mismatch when decrypting
This commit is contained in:
parent
e727097bb0
commit
9b83f6fcb2
|
@ -153,7 +153,7 @@ PublicKeyEncryptedSessionKey.prototype.decrypt = async function (key) {
|
|||
key = util.str_to_Uint8Array(decoded.substring(1, decoded.length - 2));
|
||||
|
||||
if (!util.equalsUint8Array(checksum, util.write_checksum(key))) {
|
||||
throw new Error('Checksum mismatch');
|
||||
throw new Error('Decryption error');
|
||||
} else {
|
||||
this.sessionKey = key;
|
||||
this.sessionKeyAlgorithm = enums.read(enums.symmetric, decoded.charCodeAt(0));
|
||||
|
|
Loading…
Reference in New Issue
Block a user