diff --git a/src/main/java/com/owncloud/android/utils/EncryptionUtils.java b/src/main/java/com/owncloud/android/utils/EncryptionUtils.java index fbe36dd13e11..2cfdfcf34ff5 100644 --- a/src/main/java/com/owncloud/android/utils/EncryptionUtils.java +++ b/src/main/java/com/owncloud/android/utils/EncryptionUtils.java @@ -514,7 +514,7 @@ public static String encryptPrivateKey(String privateKey, String keyPhrase) thro 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);