Class CatalogSelector

java.lang.Object
zeroecho.core.CatalogSelector

public final class CatalogSelector extends Object
Helper routines for catalog selection by family and roles.

Purpose

This final static nested class provides reusable filtering helpers over CryptoAlgorithms that can be shared by other CLI utilities. The selection logic iterates the discovered algorithm identifiers and checks metadata exposed by CryptoAlgorithm.
  • 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 - required AlgorithmFamily
      requireAllRoles - set of KeyUsage roles that must be supported
      Returns:
      list of matching algorithm ids in discovery order
      Throws:
      NullPointerException - if family or requireAllRoles is null
    • selectByFamily

      public static List<String> selectByFamily(AlgorithmFamily family)
      Returns algorithm ids that belong to the given family, regardless of roles.
      Parameters:
      family - required AlgorithmFamily
      Returns:
      list of matching algorithm ids in discovery order
    • selectByRoles

      public static List<String> selectByRoles(Collection<KeyUsage> requireAllRoles)
      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