Package io.github.mahmoudimus.quic
Record Class Secrets
java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.Secrets
- Record Components:
level- the encryption level the secrets protectsuite- the negotiated cipher suiteclient- the client's traffic secret (what the client writes with)server- the server's traffic secret (what the server writes with)
public record Secrets(EncryptionLevel level, CipherSuite suite, byte[] client, byte[] server)
extends Record
The traffic secrets for one encryption level, as the TLS handshake hands them to packet
protection: one secret per direction and the cipher suite they are for.
-
Constructor Summary
ConstructorsConstructorDescriptionSecrets(EncryptionLevel level, CipherSuite suite, byte[] client, byte[] server) Creates an instance of aSecretsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]client()Returns the value of theclientrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.byte[]server()Returns the value of theserverrecord component.suite()Returns the value of thesuiterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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). -
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
suite
Returns the value of thesuiterecord component.- Returns:
- the value of the
suiterecord component
-
client
public byte[] client()Returns the value of theclientrecord component.- Returns:
- the value of the
clientrecord component
-
server
public byte[] server()Returns the value of theserverrecord component.- Returns:
- the value of the
serverrecord component
-