java.lang.Object
java.lang.Record
it.auties.whatsapp.crypto.GroupCipher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull Keys
The field for thekeys
record component.private final @NonNull SenderKeyName
The field for thename
record component. -
Constructor Summary
ConstructorsConstructorDescriptionGroupCipher
(@NonNull SenderKeyName name, @NonNull Keys keys) Creates an instance of aGroupCipher
record class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
decrypt
(byte[] data) encrypt
(byte[] data) final boolean
Indicates whether some other object is "equal to" this one.private SenderMessageKey
getSenderKey
(SenderKeyState senderKeyState, int iteration) final int
hashCode()
Returns a hash code value for this object.@NonNull Keys
keys()
Returns the value of thekeys
record component.@NonNull SenderKeyName
name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
name
The field for thename
record component. -
keys
The field for thekeys
record component.
-
-
Constructor Details
-
GroupCipher
Creates an instance of aGroupCipher
record class.- Parameters:
name
- the value for thename
record componentkeys
- the value for thekeys
record component
-
-
Method Details
-
encrypt
-
decrypt
public byte[] decrypt(byte[] data) -
getSenderKey
-
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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
keys
Returns the value of thekeys
record component.- Returns:
- the value of the
keys
record component
-