mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-05 08:45:08 -05:00
Remove MD5 support
This commit is contained in:
parent
e72e47d92e
commit
225e248293
@ -193,6 +193,11 @@ public class Preferences {
|
||||
if (mSharedPreferences.getInt(Constants.Pref.DEFAULT_FILE_COMPRESSION, 0) == 0x21070001) {
|
||||
setDefaultFileCompression(CompressionAlgorithmTags.UNCOMPRESSED);
|
||||
}
|
||||
|
||||
// migrate away from MD5
|
||||
if (mSharedPreferences.getInt(Constants.Pref.DEFAULT_HASH_ALGORITHM, 0) == HashAlgorithmTags.MD5) {
|
||||
setDefaultHashAlgorithm(HashAlgorithmTags.SHA512);
|
||||
}
|
||||
}
|
||||
|
||||
public void setWriteVersionHeader(boolean conceal) {
|
||||
|
@ -317,10 +317,10 @@ public class PreferencesActivity extends PreferenceActivity {
|
||||
|
||||
private static void initializeHashAlgorithm
|
||||
(final IntegerListPreference mHashAlgorithm, int[] valueIds, String[] entries, String[] values) {
|
||||
valueIds = new int[]{HashAlgorithmTags.MD5, HashAlgorithmTags.RIPEMD160,
|
||||
valueIds = new int[]{HashAlgorithmTags.RIPEMD160,
|
||||
HashAlgorithmTags.SHA1, HashAlgorithmTags.SHA224, HashAlgorithmTags.SHA256,
|
||||
HashAlgorithmTags.SHA384, HashAlgorithmTags.SHA512,};
|
||||
entries = new String[]{"MD5", "RIPEMD-160", "SHA-1", "SHA-224", "SHA-256", "SHA-384",
|
||||
entries = new String[]{"RIPEMD-160", "SHA-1", "SHA-224", "SHA-256", "SHA-384",
|
||||
"SHA-512",};
|
||||
values = new String[valueIds.length];
|
||||
for (int i = 0; i < values.length; ++i) {
|
||||
|
@ -50,7 +50,6 @@ public class AlgorithmNames {
|
||||
mEncryptionNames.put(PGPEncryptedData.TRIPLE_DES, "Triple DES");
|
||||
mEncryptionNames.put(PGPEncryptedData.IDEA, "IDEA");
|
||||
|
||||
mHashNames.put(HashAlgorithmTags.MD5, "MD5");
|
||||
mHashNames.put(HashAlgorithmTags.RIPEMD160, "RIPEMD-160");
|
||||
mHashNames.put(HashAlgorithmTags.SHA1, "SHA-1");
|
||||
mHashNames.put(HashAlgorithmTags.SHA224, "SHA-224");
|
||||
|
Loading…
Reference in New Issue
Block a user