, org.bouncycastle.operator.DefaultAlgorithmNameFinder
. - - ( Bouncy Castle 1.57 - 1.46 ).
:
DefaultAlgorithmNameFinder algFinder = new DefaultAlgorithmNameFinder();
System.out.println(algFinder.getAlgorithmName(new ASN1ObjectIdentifier("1.2.840.113549.1.1.11")));
:
SHA256WITHRSA
javadoc, , OID, .
Also note that (as indicated in @pepo's answer ), humanoid names may differ from different tools. As long as the BouncyCastle returns SHA256WITHRSA
, the OID repository site uses sha256WithRSAEncryption
.
For other OIDs (e.g. extensions and other fields), I could not find anything in the API, so the only alternative seems to be a large lookup table.
user7605325
source
share