|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder
Default implementation of SignatureAlgorithmIdentifierFinder,
returning the (algorithm OID plus any
algorithm-specific parameters) used to name a signature scheme in
X.509 certificates, CMS SignedData, OCSP responses and related PKIX
structures.
Parameter-field convention for RSA-PSS: when this finder builds the structure for names, the hash sub-identifier inside the field (and the inner hash inside ) is emitted with parameters, following RFC 4055 §2.1 which defines } (and the same pattern for SHA-1 / SHA-224 / SHA-384 / SHA-512). SHA-3 inside PSS follows the same NULL-parameter convention here for consistency.
This is a different convention from
DefaultDigestAlgorithmIdentifierFinder, which (for the CMS contexts
it serves) follows RFC 5754 §2 and emits SHA-2 / SHA-3 digest identifiers
with the field absent. Both forms are
standards-compliant in their respective slots; the practical consequence is
that a single CMS SignedData with a PSS SignerInfo will validly contain the
same SHA-2 OID encoded both ways. See the class-level javadoc on
DefaultDigestAlgorithmIdentifierFinder for the cross-reference.
| Constructor Summary | |
DefaultSignatureAlgorithmIdentifierFinder()
|
|
| Method Summary | |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
find(java.lang.String sigAlgName)
Find the signature algorithm identifier that matches with the passed in signature algorithm name. |
boolean |
hasAlgorithm(java.lang.String sigAlgName)
Return true if a signature algorithm of the passed in name is recognised, false otherwise. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultSignatureAlgorithmIdentifierFinder()
| Method Detail |
public boolean hasAlgorithm(java.lang.String sigAlgName)
find(String) returns an identifier; where it returns false
throws, 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.
sigAlgName - the name of the signature algorithm of interest.
public org.bouncycastle.asn1.x509.AlgorithmIdentifier find(java.lang.String sigAlgName)
SignatureAlgorithmIdentifierFinder
find in interface SignatureAlgorithmIdentifierFindersigAlgName - the name of the signature algorithm of interest.
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||