Skip to content

Commit

Permalink
Remove unused codes
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <alper_ozturk@proton.me>
  • Loading branch information
alperozturk96 committed Mar 22, 2024
1 parent 99f7b67 commit caaacab
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions app/src/main/java/com/owncloud/android/utils/EncryptionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -640,35 +640,6 @@ public static void decryptFile(Cipher cipher,
}
}

// FIXME Decryption is broken
/*
public static byte[] decryptFile(
Cipher cipher,
File file,
byte[] authenticationTag,
ArbitraryDataProvider arbitraryDataProvider,
User user)
throws BadPaddingException, IllegalBlockSizeException, IOException {
RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r");
byte[] fileBytes = new byte[(int) randomAccessFile.length()];
randomAccessFile.readFully(fileBytes);
// check authentication tag
byte[] extractedAuthenticationTag = Arrays.copyOfRange(fileBytes,
fileBytes.length - (128 / 8),
fileBytes.length);
if (!Arrays.equals(extractedAuthenticationTag, authenticationTag)) {
reportE2eError(arbitraryDataProvider, user);
throw new SecurityException("Tag not correct");
}
return cipher.doFinal(fileBytes);
}
*/


/**
* Encrypt string with RSA algorithm, ECB mode, OAEPWithSHA-256AndMGF1 padding Asymmetric encryption, with private
* and public key
Expand Down

0 comments on commit caaacab

Please sign in to comment.