Package com.yahoo.security.hpke
Record Class Ciphersuite
java.lang.Object
java.lang.Record
com.yahoo.security.hpke.Ciphersuite
A Ciphersuite is a 3-tuple that encapsulates the necessary primitives to use HKDF:
- A key encapsulation mechanism (KEM)
- A key derivation function (KDF)
- An "authenticated encryption with associated data" (AEAD) algorithm
- Author:
- vekterli
-
Constructor Summary
ConstructorsConstructorDescriptionCiphersuite(Kem kem, Kdf kdf, Aead aead) Creates an instance of aCiphersuiterecord class. -
Method Summary
Modifier and TypeMethodDescriptionaead()Returns the value of theaeadrecord component.static CiphersuiteReturns a Ciphersuite of DHKEM(X25519, HKDF-SHA256), HKDF-SHA256, AES-128-GCMfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kdf()Returns the value of thekdfrecord component.kem()Returns the value of thekemrecord component.static Ciphersuitefinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Ciphersuite
Creates an instance of aCiphersuiterecord class.- Parameters:
kem- the value for thekemrecord componentkdf- the value for thekdfrecord componentaead- the value for theaeadrecord component
-
-
Method Details
-
of
-
defaultSuite
Returns a Ciphersuite of DHKEM(X25519, HKDF-SHA256), HKDF-SHA256, AES-128-GCM -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
kem
Returns the value of thekemrecord component.- Returns:
- the value of the
kemrecord component
-
kdf
Returns the value of thekdfrecord component.- Returns:
- the value of the
kdfrecord component
-
aead
Returns the value of theaeadrecord component.- Returns:
- the value of the
aeadrecord component
-