Module it.auties.whatsappweb4j
Record Class SignalPreKeyPair
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.signal.keypair.SignalPreKeyPair
- All Implemented Interfaces:
ISignalKeyPair
public record SignalPreKeyPair(int id, byte @NonNull [] publicKey, byte[] privateKey)
extends Record
implements ISignalKeyPair
-
Constructor Summary
ConstructorDescriptionSignalPreKeyPair
(int id, byte[] publicKey, byte[] privateKey) Creates an instance of aSignalPreKeyPair
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.byte[]
Returns the value of theprivateKey
record component.byte @NonNull []
Returns the value of thepublicKey
record component.static SignalPreKeyPair
random
(int id) toNode()
final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface it.auties.whatsapp.model.signal.keypair.ISignalKeyPair
encodedId, encodedPublicKey
-
Constructor Details
-
SignalPreKeyPair
public SignalPreKeyPair(int id, byte[] publicKey, byte[] privateKey) Creates an instance of aSignalPreKeyPair
record class.- Parameters:
id
- the value for theid
record componentpublicKey
- the value for thepublicKey
record componentprivateKey
- the value for theprivateKey
record component
-
-
Method Details
-
random
-
toNode
- Specified by:
toNode
in interfaceISignalKeyPair
-
toGenericKeyPair
- Specified by:
toGenericKeyPair
in interfaceISignalKeyPair
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
public int id()Returns the value of theid
record component.- Specified by:
id
in interfaceISignalKeyPair
- Returns:
- the value of the
id
record component
-
publicKey
public byte @NonNull [] publicKey()Returns the value of thepublicKey
record component.- Specified by:
publicKey
in interfaceISignalKeyPair
- Returns:
- the value of the
publicKey
record component
-
privateKey
public byte[] privateKey()Returns the value of theprivateKey
record component.- Specified by:
privateKey
in interfaceISignalKeyPair
- Returns:
- the value of the
privateKey
record component
-