浏览代码

Use correctly encoded authenticationTagString

Signed-off-by: alperozturk <alper_ozturk@proton.me>
alperozturk 1 年之前
父节点
当前提交
b8af027528
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/java/com/owncloud/android/utils/EncryptionUtils.java

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

@@ -587,7 +587,7 @@ public final class EncryptionUtils {
         File encryptedFile = new File(file.getAbsolutePath() + ".enc");
         encryptFileWithGivenCipher(file, encryptedFile, cipher);
         byte[] authenticationTag = cipher.getParameters().getParameterSpec(GCMParameterSpec.class).getIV();
-        String authenticationTagString = new String(authenticationTag, StandardCharsets.UTF_8);
+        String authenticationTagString = encodeBytesToBase64String(authenticationTag);
         return new EncryptedFile(encryptedFile, authenticationTagString);
     }