Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions Safe/src/main/java/org/openintents/safe/CryptoHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ private void initialize(int Strength) {
try {
keyFac = SecretKeyFactory
.getInstance(algorithm, "BC");
} catch (NoSuchAlgorithmException e) {
Log.e(TAG, "CryptoHelper(): " + e.toString());
} catch (NoSuchProviderException e) {
} catch (NoSuchAlgorithmException | NoSuchProviderException e) {
Log.e(TAG, "CryptoHelper(): " + e.toString());
}
}
Expand Down Expand Up @@ -208,9 +206,7 @@ public static byte[] md5String(String message) {
dIn.read();
}

} catch (NoSuchAlgorithmException e) {
Log.e(TAG, "md5String(): " + e.toString());
} catch (IOException e) {
} catch (NoSuchAlgorithmException | IOException e) {
Log.e(TAG, "md5String(): " + e.toString());
}

Expand Down Expand Up @@ -965,13 +961,8 @@ public boolean decryptStreamWithSessionKey(InputStream is, OutputStream os) thro
pbeCipher.init(Cipher.DECRYPT_MODE, pbeKey, pbeParamSpec);
byteSessionKey = pbeCipher.doFinal(byteCipherSessionKey);
status = true;
} catch (IllegalBlockSizeException e) {
Log.e(TAG, "decrypt(): " + e.toString());
} catch (BadPaddingException e) {
Log.e(TAG, "decrypt(): " + e.toString());
} catch (InvalidKeyException e) {
Log.e(TAG, "decrypt(): " + e.toString());
} catch (InvalidAlgorithmParameterException e) {
} catch (IllegalBlockSizeException | BadPaddingException
| InvalidKeyException | InvalidAlgorithmParameterException e) {
Log.e(TAG, "decrypt(): " + e.toString());
}

Expand Down
22 changes: 1 addition & 21 deletions Safe/src/main/java/org/openintents/safe/Restore.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,27 +203,7 @@ public boolean read(InputStreamData streamData, String masterPassword) {

restoreDataSet = myRestoreHandler.getParsedData();

} catch (ParserConfigurationException e) {
//e.printStackTrace();
Toast.makeText(
Restore.this, getString(
R.string.restore_unable_to_open,
e.getLocalizedMessage()
),
Toast.LENGTH_LONG
).show();
return false;
} catch (SAXException e) {
//e.printStackTrace();
Toast.makeText(
Restore.this, getString(
R.string.restore_unable_to_open,
e.getLocalizedMessage()
),
Toast.LENGTH_LONG
).show();
return false;
} catch (IOException e) {
} catch (ParserConfigurationException | SAXException | IOException e) {
//e.printStackTrace();
Toast.makeText(
Restore.this, getString(
Expand Down