Skip to content

Commit

Permalink
change default encryption to AES (zip) #25
Browse files Browse the repository at this point in the history
  • Loading branch information
WirelessAlien committed Jan 24, 2024
1 parent 8b7bd22 commit b474c04
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1419,11 +1419,11 @@ class CreateZipFragment : Fragment(), FileAdapter.OnDeleteClickListener, FileAd

private fun getSavedEncryptionMethod(): EncryptionMethod {
prefs = requireContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
val savedValue = prefs.getString(KEY_ENCRYPTION_METHOD, "ZIP_STANDARD") ?: "ZIP_STANDARD"
val savedValue = prefs.getString(KEY_ENCRYPTION_METHOD, "AES") ?: "AES"
return try {
EncryptionMethod.valueOf(savedValue)
} catch (e: IllegalArgumentException) {
EncryptionMethod.ZIP_STANDARD // Default value if the saved string is not a valid enum constant
EncryptionMethod.AES // Default value if the saved string is not a valid enum constant
}
}

Expand Down

0 comments on commit b474c04

Please sign in to comment.