java.lang.Object
java.lang.Record
it.auties.whatsapp.crypto.SessionBuilder
-
Constructor Summary
ConstructorDescriptionSessionBuilder
(@NonNull SessionAddress address, @NonNull Keys keys) Creates an instance of aSessionBuilder
record class. -
Method Summary
Modifier and TypeMethodDescription@NonNull SessionAddress
address()
Returns the value of theaddress
record component.void
createIncoming
(Session session, SignalPreKeyMessage message) void
createOutgoing
(int id, byte[] identityKey, SignalSignedKeyPair signedPreKey, SignalSignedKeyPair preKey) createState
(boolean isInitiator, SignalKeyPair ourEphemeralKey, SignalKeyPair ourSignedKey, byte[] theirIdentityPubKey, byte[] theirEphemeralPubKey, byte[] theirSignedPubKey, int registrationId, int version) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NonNull Keys
keys()
Returns the value of thekeys
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SessionBuilder
Creates an instance of aSessionBuilder
record class.- Parameters:
address
- the value for theaddress
record componentkeys
- the value for thekeys
record component
-
-
Method Details
-
createOutgoing
public void createOutgoing(int id, byte[] identityKey, SignalSignedKeyPair signedPreKey, SignalSignedKeyPair preKey) -
createState
public SessionState createState(boolean isInitiator, SignalKeyPair ourEphemeralKey, SignalKeyPair ourSignedKey, byte[] theirIdentityPubKey, byte[] theirEphemeralPubKey, byte[] theirSignedPubKey, int registrationId, int version) -
createIncoming
-
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)
. -
address
Returns the value of theaddress
record component.- Returns:
- the value of the
address
record component
-
keys
Returns the value of thekeys
record component.- Returns:
- the value of the
keys
record component
-