Class CatalogSelector
java.lang.Object
zeroecho.core.CatalogSelector
Helper routines for catalog selection by family and roles.
Purpose
This final static nested class provides reusable filtering helpers overCryptoAlgorithms that can be shared by other CLI
utilities. The selection logic iterates the discovered algorithm identifiers
and checks metadata exposed by CryptoAlgorithm.-
Method Summary
Modifier and TypeMethodDescriptionselectByFamily(AlgorithmFamily family) Returns algorithm ids that belong to the given family, regardless of roles.selectByFamilyAndRoles(AlgorithmFamily family, Collection<KeyUsage> requireAllRoles) Returns algorithm ids that belong to the given family and contain all required roles.selectByRoles(Collection<KeyUsage> requireAllRoles) Returns algorithm ids that contain all the given roles, regardless of family.
-
Method Details
-
selectByFamilyAndRoles
public static List<String> selectByFamilyAndRoles(AlgorithmFamily family, Collection<KeyUsage> requireAllRoles) Returns algorithm ids that belong to the given family and contain all required roles.- Parameters:
family- requiredAlgorithmFamilyrequireAllRoles- set ofKeyUsageroles that must be supported- Returns:
- list of matching algorithm ids in discovery order
- Throws:
NullPointerException- iffamilyorrequireAllRolesis null
-
selectByFamily
Returns algorithm ids that belong to the given family, regardless of roles.- Parameters:
family- requiredAlgorithmFamily- Returns:
- list of matching algorithm ids in discovery order
-
selectByRoles
Returns algorithm ids that contain all the given roles, regardless of family.- Parameters:
requireAllRoles- set of roles to be present- Returns:
- list of matching algorithm ids in discovery order
-