Record Class IdHash
java.lang.Object
java.lang.Record
com.io7m.idstore.model.IdHash
- Record Components:
algorithm- The JCE hash algorithm name (such as "SHA-256")hash- The ASCII-encoded hash
- All Implemented Interfaces:
Serializable
The hash of an object.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmrecord component.final booleanIndicates whether some other object is "equal to" this one.hash()Returns the value of thehashrecord component.final inthashCode()Returns a hash code value for this object.static IdHashsha256Of(byte[] data) Create a SHA-256 hash of the given data.toString()Returns a string representation of this record class.
-
Constructor Details
-
IdHash
-
-
Method Details
-
sha256Of
Create a SHA-256 hash of the given data.- Parameters:
data- The data- Returns:
- The hash
-
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). -
algorithm
-
hash
-