java.lang.Object
java.lang.Record
it.auties.whatsapp.model.media.MediaKeys
public record MediaKeys(byte[] mediaKey, byte[] iv, byte[] cipherKey, byte[] macKey, byte[] ref)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]The field for thecipherKeyrecord component.private static final intprivate final byte[]The field for theivrecord component.private final byte[]The field for themacKeyrecord component.private final byte[]The field for themediaKeyrecord component.private final byte[]The field for therefrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMediaKeys(byte[] mediaKey, byte[] iv, byte[] cipherKey, byte[] macKey, byte[] ref) Creates an instance of aMediaKeysrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the value of thecipherKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byte[]iv()Returns the value of theivrecord component.byte[]macKey()Returns the value of themacKeyrecord component.byte[]mediaKey()Returns the value of themediaKeyrecord component.static MediaKeysstatic MediaKeysbyte[]ref()Returns the value of therefrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
mediaKey
private final byte[] mediaKeyThe field for themediaKeyrecord component. -
iv
private final byte[] ivThe field for theivrecord component. -
cipherKey
private final byte[] cipherKeyThe field for thecipherKeyrecord component. -
macKey
private final byte[] macKeyThe field for themacKeyrecord component. -
ref
private final byte[] refThe field for therefrecord component. -
EXPANDED_SIZE
private static final int EXPANDED_SIZE- See Also:
-
-
Constructor Details
-
MediaKeys
public MediaKeys(byte[] mediaKey, byte[] iv, byte[] cipherKey, byte[] macKey, byte[] ref) Creates an instance of aMediaKeysrecord class.- Parameters:
mediaKey- the value for themediaKeyrecord componentiv- the value for theivrecord componentcipherKey- the value for thecipherKeyrecord componentmacKey- the value for themacKeyrecord componentref- the value for therefrecord component
-
-
Method Details
-
random
-
of
-
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). -
mediaKey
public byte[] mediaKey()Returns the value of themediaKeyrecord component.- Returns:
- the value of the
mediaKeyrecord component
-
iv
public byte[] iv()Returns the value of theivrecord component.- Returns:
- the value of the
ivrecord component
-
cipherKey
public byte[] cipherKey()Returns the value of thecipherKeyrecord component.- Returns:
- the value of the
cipherKeyrecord component
-
macKey
public byte[] macKey()Returns the value of themacKeyrecord component.- Returns:
- the value of the
macKeyrecord component
-
ref
public byte[] ref()Returns the value of therefrecord component.- Returns:
- the value of the
refrecord component
-