mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-03 15:05:24 +00:00
Don't assert on bad padding.
This commit is contained in:
parent
9dce376780
commit
c4209a65e3
@ -328,7 +328,9 @@ public class SessionCipher {
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] getPlaintext(int version, MessageKeys messageKeys, byte[] cipherText) {
|
||||
private byte[] getPlaintext(int version, MessageKeys messageKeys, byte[] cipherText)
|
||||
throws InvalidMessageException
|
||||
{
|
||||
try {
|
||||
Cipher cipher;
|
||||
|
||||
@ -340,7 +342,7 @@ public class SessionCipher {
|
||||
|
||||
return cipher.doFinal(cipherText);
|
||||
} catch (IllegalBlockSizeException | BadPaddingException e) {
|
||||
throw new AssertionError(e);
|
||||
throw new InvalidMessageException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user