Record Class AES.Key
java.lang.Object
java.lang.Record
br.net.dd.netherwingcore.common.cryptography.AES.Key
- Enclosing class:
AES
Represents an AES key encapsulating its byte data and validation logic.
Ensures the key length conforms to
AES.KEY_SIZE_BYTES.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the key data by overwriting its byte array with zeroes.byte[]data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Key
public Key(byte[] data) Creates an instance of aKeyrecord class.- Parameters:
data- the value for thedatarecord component
-
-
Method Details
-
clear
public void clear()Clears the key data by overwriting its byte array with zeroes. -
data
public byte[] data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
toString
-
hashCode
-
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).
-