Module it.auties.whatsappweb4j
Record Class SignalSignedKeyPair
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.signal.keypair.SignalSignedKeyPair
- All Implemented Interfaces:
ISignalKeyPair
public record SignalSignedKeyPair(int id, @NonNull SignalKeyPair keyPair, byte[] signature)
extends Record
implements ISignalKeyPair
-
Constructor Summary
ConstructorDescriptionSignalSignedKeyPair
(int id, @NonNull SignalKeyPair keyPair, byte[] signature) Creates an instance of aSignalSignedKeyPair
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.@NonNull SignalKeyPair
keyPair()
Returns the value of thekeyPair
record component.static SignalSignedKeyPair
of
(int id, @NonNull SignalKeyPair identityKeyPair) static Optional<SignalSignedKeyPair>
byte[]
byte[]
byte[]
Returns the value of thesignature
record component.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
-
SignalSignedKeyPair
Creates an instance of aSignalSignedKeyPair
record class.- Parameters:
id
- the value for theid
record componentkeyPair
- the value for thekeyPair
record componentsignature
- the value for thesignature
record component
-
-
Method Details
-
of
-
of
-
privateKey
public byte[] privateKey()- Specified by:
privateKey
in interfaceISignalKeyPair
-
toNode
- Specified by:
toNode
in interfaceISignalKeyPair
-
toGenericKeyPair
- Specified by:
toGenericKeyPair
in interfaceISignalKeyPair
-
publicKey
public byte[] publicKey()- Specified by:
publicKey
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
-
keyPair
Returns the value of thekeyPair
record component.- Returns:
- the value of the
keyPair
record component
-
signature
public byte[] signature()Returns the value of thesignature
record component.- Returns:
- the value of the
signature
record component
-