Эх сурвалжийг харах

Merge pull request #2154 from ardevd/master

Encryption: Get IV directly from the cipher object when encrypting the private key
Tobias Kaminsky 7 жил өмнө
parent
commit
6038848665

+ 1 - 1
src/main/java/com/owncloud/android/utils/EncryptionUtils.java

@@ -514,7 +514,7 @@ public class EncryptionUtils {
         byte[] bytes = encodeStringToBase64Bytes(privateKey);
         byte[] encrypted = cipher.doFinal(bytes);
 
-        byte[] iv = cipher.getParameters().getParameterSpec(IvParameterSpec.class).getIV();
+        byte[] iv = cipher.getIV();
         String encodedIV = encodeBytesToBase64String(iv);
         String encodedSalt = encodeBytesToBase64String(salt);
         String encodedEncryptedBytes = encodeBytesToBase64String(encrypted);