-
-
Save rsatrio/d6a0adf4b532d73d00d98074f2d8cc97 to your computer and use it in GitHub Desktop.
Get Signature Algorithm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(signerInfo.getEncryptionAlgOID().trim().equals("1.2.840.113549.1.1.1")) { | |
encAlgo="RSA"; | |
} | |
if(encAlgo!=null) { | |
if(digest.getAlgorithm().equals("1.3.14.3.2.26")) { | |
encAlgo="SHA1withRSA"; | |
} | |
else if(digest.getAlgorithm().equals("2.16.840.1.101.3.4.2.1")) { | |
encAlgo="SHA256withRSA"; | |
} | |
else if(digest.getAlgorithm().equals("2.16.840.1.101.3.4.2.2")) { | |
encAlgo="SHA384withRSA"; | |
} | |
else if(digest.getAlgorithm().equals("2.16.840.1.101.3.4.2.3")) { | |
encAlgo="SHA512withRSA"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment