Record Class SupportedAlgorithmQuery

java.lang.Object
java.lang.Record
co.ankatech.ankasecure.keymanagement.query.SupportedAlgorithmQuery
Record Components:
category - the algorithm category (for example PQC, CLASSICAL, HYBRID); null for every category
status - the catalogue status (for example RECOMMENDED, LEGACY); null for every status
minSecurityLevel - the lowest NIST security level; null for no lower bound
maxSecurityLevel - the highest NIST security level; null for no upper bound
keyOps - JWK key operations the algorithm must support (for example sign, encrypt); null for any
standards - standards the algorithm must belong to (for example FIPS-203); null for any
kty - key types (for example ML-KEM, EC, COMPOSITE); null for every type
alg - algorithm identifiers (for example ML-KEM-768); null for every algorithm
compositeMode - COMPOSITE_KEM_COMBINE or COMPOSITE_SIGNATURE; null for every mode

public record SupportedAlgorithmQuery(String category, String status, Integer minSecurityLevel, Integer maxSecurityLevel, Set<String> keyOps, Set<String> standards, Set<String> kty, Set<String> alg, Set<String> compositeMode) extends Record
The filters of the tenant's supported algorithm catalogue (keys().supportedAlgorithms).

Its components are exactly the query parameters of the listSupportedAlgorithms operation; a null component sends nothing, so the server applies its default.


 SupportedAlgorithmQuery.all().withKty(Set.of("ML-KEM")).withMinSecurityLevel(3)
 
  • Constructor Details

  • Method Details

    • all

      public static SupportedAlgorithmQuery all()
      Returns:
      no filter: the whole catalogue
    • withCategory

      public SupportedAlgorithmQuery withCategory(String value)
      Parameters:
      value - the new category; null clears it
      Returns:
      a copy of this query with category replaced
    • withStatus

      public SupportedAlgorithmQuery withStatus(String value)
      Parameters:
      value - the new status; null clears it
      Returns:
      a copy of this query with status replaced
    • withMinSecurityLevel

      public SupportedAlgorithmQuery withMinSecurityLevel(Integer value)
      Parameters:
      value - the new minSecurityLevel; null clears it
      Returns:
      a copy of this query with minSecurityLevel replaced
    • withMaxSecurityLevel

      public SupportedAlgorithmQuery withMaxSecurityLevel(Integer value)
      Parameters:
      value - the new maxSecurityLevel; null clears it
      Returns:
      a copy of this query with maxSecurityLevel replaced
    • withKeyOps

      public SupportedAlgorithmQuery withKeyOps(Set<String> value)
      Parameters:
      value - the new keyOps; null clears it
      Returns:
      a copy of this query with keyOps replaced
    • withStandards

      public SupportedAlgorithmQuery withStandards(Set<String> value)
      Parameters:
      value - the new standards; null clears it
      Returns:
      a copy of this query with standards replaced
    • withKty

      public SupportedAlgorithmQuery withKty(Set<String> value)
      Parameters:
      value - the new kty; null clears it
      Returns:
      a copy of this query with kty replaced
    • withAlg

      public SupportedAlgorithmQuery withAlg(Set<String> value)
      Parameters:
      value - the new alg; null clears it
      Returns:
      a copy of this query with alg replaced
    • withCompositeMode

      public SupportedAlgorithmQuery withCompositeMode(Set<String> value)
      Parameters:
      value - the new compositeMode; null clears it
      Returns:
      a copy of this query with compositeMode replaced
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • category

      public String category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • minSecurityLevel

      public Integer minSecurityLevel()
      Returns the value of the minSecurityLevel record component.
      Returns:
      the value of the minSecurityLevel record component
    • maxSecurityLevel

      public Integer maxSecurityLevel()
      Returns the value of the maxSecurityLevel record component.
      Returns:
      the value of the maxSecurityLevel record component
    • keyOps

      public Set<String> keyOps()
      Returns the value of the keyOps record component.
      Returns:
      the value of the keyOps record component
    • standards

      public Set<String> standards()
      Returns the value of the standards record component.
      Returns:
      the value of the standards record component
    • kty

      public Set<String> kty()
      Returns the value of the kty record component.
      Returns:
      the value of the kty record component
    • alg

      public Set<String> alg()
      Returns the value of the alg record component.
      Returns:
      the value of the alg record component
    • compositeMode

      public Set<String> compositeMode()
      Returns the value of the compositeMode record component.
      Returns:
      the value of the compositeMode record component