Skip to content

Commit

Permalink
Fix compile errors in FilesCrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
zHd4 committed Dec 5, 2024
1 parent 12b0dc2 commit 2d828a5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions app/src/main/java/app/notesr/crypto/FilesCrypt.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,15 @@ public static FileInfo decryptInfo(EncryptedFileInfo encryptedFileInfo, CryptoKe
decryptedType = new String(aes.decrypt(encryptedType));
}

return new FileInfo(
encryptedFileInfo.getId(),
encryptedFileInfo.getNoteId(),
encryptedFileInfo.getSize(),
decryptedName,
decryptedType,
encryptedFileInfo.getCreatedAt(),
encryptedFileInfo.getUpdatedAt());
return FileInfo.builder()
.id(encryptedFileInfo.getId())
.noteId(encryptedFileInfo.getNoteId())
.size(encryptedFileInfo.getSize())
.name(decryptedName)
.type(decryptedType)
.createdAt(encryptedFileInfo.getCreatedAt())
.updatedAt(encryptedFileInfo.getUpdatedAt())
.build();
} catch (Exception e) {
Log.e("Cannot decrypt file info", e.toString());
throw new RuntimeException(e);
Expand Down

0 comments on commit 2d828a5

Please sign in to comment.