Package co.ankatech.ankasecure.sdk.model
Class AlgorithmFilter.Builder
java.lang.Object
co.ankatech.ankasecure.sdk.model.AlgorithmFilter.Builder
- Enclosing class:
- AlgorithmFilter
Builder for constructing
AlgorithmFilter instances.
All methods return the builder for fluent chaining.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the AlgorithmFilter instance.Filter by algorithm names (OR logic).withCategory(AlgorithmInfo.Category category) Filter by algorithm category.withCompositeMode(CompositeMode... modes) Filter by composite construction (OR logic).withKeyOps(String... ops) Filter by required key operations (AND logic).Filter by key types (OR logic).withMaxSecurityLevel(int level) Filter by maximum NIST security level (inclusive).withMinSecurityLevel(int level) Filter by minimum NIST security level (inclusive).withSecurityLevel(int level) Filter by exact NIST security level.withStandards(String... standards) Filter by required standards compliance (AND logic).withStatus(AlgorithmInfo.Status status) Filter by lifecycle status.
-
Method Details
-
withCategory
Filter by algorithm category.- Parameters:
category- POST_QUANTUM or CLASSICAL- Returns:
- this builder
-
withStatus
Filter by lifecycle status.- Parameters:
status- RECOMMENDED, LEGACY, or EXPERIMENTAL- Returns:
- this builder
-
withMinSecurityLevel
Filter by minimum NIST security level (inclusive).- Parameters:
level- minimum level (1, 3, or 5)- Returns:
- this builder
-
withMaxSecurityLevel
Filter by maximum NIST security level (inclusive).- Parameters:
level- maximum level (1, 3, or 5)- Returns:
- this builder
-
withSecurityLevel
Filter by exact NIST security level.- Parameters:
level- exact level (1, 3, or 5)- Returns:
- this builder
-
withKeyOps
Filter by required key operations (AND logic). Algorithm must support ALL specified operations.- Parameters:
ops- operations to require (e.g., "encrypt", "decrypt", "sign", "verify")- Returns:
- this builder
-
withStandards
Filter by required standards compliance (AND logic). Algorithm must be endorsed by ALL specified standards.- Parameters:
standards- standards to require (e.g., "NIST", "BSI", "ANSSI")- Returns:
- this builder
-
withKty
Filter by key types (OR logic). Algorithm matches if its kty equals ANY specified value.- Parameters:
ktyValues- key types (e.g., "ML-KEM", "ML-DSA", "RSA", "EC")- Returns:
- this builder
-
withCompositeMode
Filter by composite construction (OR logic). A hybrid algorithm matches if its compositeMode equals ANY specified value; a simple algorithm never matches, because it has no construction.This is the criterion that separates hybrid KEMs from hybrid signatures. Filtering on
ktycannot: every hybrid entry publishes the same coarseCOMPOSITEtoken.- Parameters:
modes- composite constructions to match; must not benull, and individualnullelements are ignored- Returns:
- this builder
- Throws:
NullPointerException- ifmodesisnull
-
withAlg
Filter by algorithm names (OR logic). Algorithm matches if its alg equals ANY specified value.- Parameters:
algValues- algorithm names (e.g., "ML-KEM-768", "RSA-4096")- Returns:
- this builder
-
build
Builds the AlgorithmFilter instance.- Returns:
- a new AlgorithmFilter with the configured criteria
-