Package org.bouncycastle.operator
Class DefaultSignatureAlgorithmIdentifierFinder
java.lang.Object
org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder
- All Implemented Interfaces:
AlgorithmIdentifierFinder,SignatureAlgorithmIdentifierFinder
public class DefaultSignatureAlgorithmIdentifierFinder
extends Object
implements SignatureAlgorithmIdentifierFinder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.x509.AlgorithmIdentifierFind the signature algorithm identifier that matches with the passed in signature algorithm name.booleanhasAlgorithm(String sigAlgName) Return true if a signature algorithm of the passed in name is recognised, false otherwise.
-
Constructor Details
-
DefaultSignatureAlgorithmIdentifierFinder
public DefaultSignatureAlgorithmIdentifierFinder()
-
-
Method Details
-
hasAlgorithm
Return true if a signature algorithm of the passed in name is recognised, false otherwise. Where this returns truefind(String)returns an identifier; where it returns falsefindthrows, so this is the way to test for support without catching.Declared here rather than on
SignatureAlgorithmIdentifierFinder, which is long published - adding a method there would break every implementation outside this library.- Parameters:
sigAlgName- the name of the signature algorithm of interest.- Returns:
- true if the name is recognised, false otherwise.
-
find
Description copied from interface:SignatureAlgorithmIdentifierFinderFind the signature algorithm identifier that matches with the passed in signature algorithm name.- Specified by:
findin interfaceAlgorithmIdentifierFinder- Specified by:
findin interfaceSignatureAlgorithmIdentifierFinder- Parameters:
sigAlgName- the name of the signature algorithm of interest.- Returns:
- an algorithm identifier for the corresponding signature.
-