java.lang.Object
java.lang.Record
it.auties.whatsapp.model.signal.keypair.SignalKeyPair
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,ISignalKeyPair
public record SignalKeyPair(byte[] publicKey, byte[] privateKey)
extends Record
implements ISignalKeyPair, it.auties.protobuf.model.ProtobufMessage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]The field for theprivateKeyrecord component.private final byte[]The field for thepublicKeyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSignalKeyPair(byte[] publicKey, byte[] privateKey) Creates an instance of aSignalKeyPairrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SignalKeyPairof(byte[] publicKey) byte[]Returns the value of theprivateKeyrecord component.byte[]Returns the value of thepublicKeyrecord component.static SignalKeyPairrandom()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, id
-
Field Details
-
publicKey
private final byte[] publicKeyThe field for thepublicKeyrecord component. -
privateKey
private final byte[] privateKeyThe field for theprivateKeyrecord component.
-
-
Constructor Details
-
SignalKeyPair
public SignalKeyPair(byte[] publicKey, byte[] privateKey) Creates an instance of aSignalKeyPairrecord class.- Parameters:
publicKey- the value for thepublicKeyrecord componentprivateKey- the value for theprivateKeyrecord component
-
-
Method Details
-
of
-
random
-
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). -
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. -
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
-