Module it.auties.cobalt
Record Class SignalPreKeyPair
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.signal.keypair.SignalPreKeyPair
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,ISignalKeyPair
public record SignalPreKeyPair(int id, byte[] publicKey, byte[] privateKey)
extends Record
implements ISignalKeyPair, it.auties.protobuf.model.ProtobufMessage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theidrecord component.private final byte[]The field for theprivateKeyrecord component.private final byte[]The field for thepublicKeyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSignalPreKeyPair(int id, byte[] publicKey, byte[] privateKey) Creates an instance of aSignalPreKeyPairrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.byte[]Returns the value of theprivateKeyrecord component.byte[]Returns the value of thepublicKeyrecord component.static SignalPreKeyPairrandom(int id) toNode()final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.auties.whatsapp.model.signal.keypair.ISignalKeyPair
encodedId, encodedPublicKey
-
Field Details
-
id
private final int idThe field for theidrecord component. -
publicKey
private final byte[] publicKeyThe field for thepublicKeyrecord component. -
privateKey
private final byte[] privateKeyThe field for theprivateKeyrecord component.
-
-
Constructor Details
-
SignalPreKeyPair
public SignalPreKeyPair(int id, byte[] publicKey, byte[] privateKey) Creates an instance of aSignalPreKeyPairrecord class.- Parameters:
id- the value for theidrecord componentpublicKey- the value for thepublicKeyrecord componentprivateKey- the value for theprivateKeyrecord component
-
-
Method Details
-
random
-
toNode
- Specified by:
toNodein interfaceISignalKeyPair
-
toGenericKeyPair
- Specified by:
toGenericKeyPairin 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 theidrecord component.- Specified by:
idin interfaceISignalKeyPair- Returns:
- the value of the
idrecord component
-
publicKey
public byte[] publicKey()Returns the value of thepublicKeyrecord component.- Specified by:
publicKeyin interfaceISignalKeyPair- Returns:
- the value of the
publicKeyrecord component
-
privateKey
public byte[] privateKey()Returns the value of theprivateKeyrecord component.- Specified by:
privateKeyin interfaceISignalKeyPair- Returns:
- the value of the
privateKeyrecord component
-