mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
BadPaddingExceptions should be rethrown as RuntimeExceptions.
This commit is contained in:
@@ -51,7 +51,7 @@ implements ConnectionEncrypter {
|
||||
try {
|
||||
out.write(frameCipher.doFinal(mac));
|
||||
} catch(BadPaddingException badCipher) {
|
||||
throw new IOException(badCipher);
|
||||
throw new RuntimeException(badCipher);
|
||||
} catch(IllegalBlockSizeException badCipher) {
|
||||
throw new RuntimeException(badCipher);
|
||||
}
|
||||
@@ -85,7 +85,7 @@ implements ConnectionEncrypter {
|
||||
try {
|
||||
out.write(ivCipher.doFinal(iv));
|
||||
} catch(BadPaddingException badCipher) {
|
||||
throw new IOException(badCipher);
|
||||
throw new RuntimeException(badCipher);
|
||||
} catch(IllegalBlockSizeException badCipher) {
|
||||
throw new RuntimeException(badCipher);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user