Package com.io7m.idstore.model
Record Class IdToken
java.lang.Object
java.lang.Record
com.io7m.idstore.model.IdToken
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static IdTokengenerate()Generate a random token, using a default strong RNG instance.static IdTokengenerate(SecureRandom random) Generate a random token.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
VALID_HEX
The pattern that defines a valid token.
-
-
Constructor Details
-
IdToken
-
-
Method Details
-
generate
Generate a random token.- Parameters:
random- The secure random instance- Returns:
- A random token
-
generate
Generate a random token, using a default strong RNG instance.- Returns:
- A random token
-
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). -
value
-