diff --git a/components/net/sf/briar/transport/ConnectionEncrypterImpl.java b/components/net/sf/briar/transport/ConnectionEncrypterImpl.java index 17454fc98a931e84992aa36cfc6ffd7fa134f8db..c505deda338dd6c7a447a5ed594021e4d638ecc3 100644 --- a/components/net/sf/briar/transport/ConnectionEncrypterImpl.java +++ b/components/net/sf/briar/transport/ConnectionEncrypterImpl.java @@ -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); }