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