From f6e5ef415ad583abf905ead8674a8e9bd89dbada Mon Sep 17 00:00:00 2001
From: akwizgran <akwizgran@users.sourceforge.net>
Date: Mon, 19 Sep 2011 14:53:44 +0100
Subject: [PATCH] BadPaddingExceptions should be rethrown as RuntimeExceptions.

---
 .../net/sf/briar/transport/ConnectionEncrypterImpl.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/net/sf/briar/transport/ConnectionEncrypterImpl.java b/components/net/sf/briar/transport/ConnectionEncrypterImpl.java
index 17454fc98a..c505deda33 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);
 		}
-- 
GitLab