Interface KemAlgorithmIdentifierFinder
- All Superinterfaces:
AlgorithmIdentifierFinder
- All Known Implementing Classes:
DefaultKemAlgorithmIdentifierFinder
Finder for the
AlgorithmIdentifier naming a key encapsulation
mechanism, as it appears in a SubjectPublicKeyInfo, a CMS KEMRecipientInfo
(RFC 9629) or a CMP KemCiphertextInfo.
This is the KEM counterpart of SignatureAlgorithmIdentifierFinder.
The reverse direction - naming an OID that arrived from a peer - is
DefaultAlgorithmNameFinder.
-
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.x509.AlgorithmIdentifierFind the KEM algorithm identifier that matches with the passed in KEM algorithm name.booleanhasAlgorithm(String kemAlgName) Return true if a KEM algorithm of the passed in name is recognised, false otherwise.
-
Method Details
-
hasAlgorithm
Return true if a KEM 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.- Parameters:
kemAlgName- the name of the KEM algorithm of interest.- Returns:
- true if the name is recognised, false otherwise.
-
find
Find the KEM algorithm identifier that matches with the passed in KEM algorithm name.- Specified by:
findin interfaceAlgorithmIdentifierFinder- Parameters:
kemAlgName- the name of the KEM algorithm of interest.- Returns:
- an algorithm identifier for the corresponding KEM.
- Throws:
IllegalArgumentException- if the name is not recognised.
-