Package co.ankatech.ankasecure.sdk.model
Class AlgorithmPair
java.lang.Object
co.ankatech.ankasecure.sdk.model.AlgorithmPair
Immutable pair of classical and post-quantum algorithm identifiers.
Used for composite key recommendations and compatibility validation. This class represents a valid combination of a classical algorithm (e.g., X25519, RSA-3072) with a PQC algorithm (e.g., ML-KEM-768, ML-DSA-65).
Example Usage:
AlgorithmPair pair = new AlgorithmPair("X25519", "ML-KEM-768");
System.out.println(pair.getClassicalAlgorithm()); // X25519
System.out.println(pair.getPqcAlgorithm()); // ML-KEM-768
System.out.println(pair); // X25519 + ML-KEM-768
- Since:
- 3.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmPair(String classicalAlgorithm, String pqcAlgorithm) Creates a new algorithm pair. -
Method Summary
-
Constructor Details
-
AlgorithmPair
Creates a new algorithm pair.- Parameters:
classicalAlgorithm- the classical algorithm API value (e.g., "X25519", "RSA-3072")pqcAlgorithm- the PQC algorithm API value (e.g., "ML-KEM-768", "ML-DSA-65")- Throws:
NullPointerException- if either parameter is null
-
-
Method Details
-
getClassicalAlgorithm
Returns the classical algorithm in this pair.- Returns:
- the classical algorithm API value (e.g., "X25519", "RSA-3072", "Ed25519")
-
getPqcAlgorithm
Returns the PQC algorithm in this pair.- Returns:
- the PQC algorithm API value (e.g., "ML-KEM-768", "ML-DSA-65")
-
equals
-
hashCode
public int hashCode() -
toString
-