File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
android/src/main/java/com/pedrouid/crypto Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,10 @@ private String getAlgorithmFromHash(final String hash) {
3838 return "SHA256withRSA" ;
3939 } else if (hash .equals ("SHA384" )) {
4040 return "SHA384withRSA" ;
41+ } else if (hash .equals ("SHA512" )) {
42+ return "SHA512withRSA" ;
4143 } else {
42- return "SHA1withRSA " ;
44+ return "SHA512withRSA " ;
4345 }
4446}
4547
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ + (SecKeyAlgorithm)getAlgorithmFromHash:(NSString *)hash {
2323 return kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA256 ;
2424 } else if ([hash isEqualToString: @" SHA384" ]) {
2525 return kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA384 ;
26+ } else if ([hash isEqualToString: @" SHA512" ]) {
27+ return kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA512 ;
2628 } else {
2729 return kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA512 ;
2830 }
You can’t perform that action at this time.
0 commit comments