Package com.yahoo.security.token
Record Class TokenFingerprint
java.lang.Object
java.lang.Record
com.yahoo.security.token.TokenFingerprint
A token fingerprint represents an opaque sequence of bytes that is expected to globally identify any particular token within a particular token domain.
Token fingerprints should not be used directly for access checks; use derived
TokenCheckHash instances for this purpose.
Fingerprints are printed in the common hex:hex:hex:... format, e.g.
53:2e:4e:09:d5:4f:96:f4:1a:44:82:ef:f0:44:b9:a2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final byte[] -
Constructor Summary
ConstructorsConstructorDescriptionTokenFingerprint(byte[] hashBytes) Creates an instance of aTokenFingerprintrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.byte[]Returns the value of thehashBytesrecord component.inthashCode()Returns a hash code value for this object.static TokenFingerprintstatic TokenFingerprintstatic TokenFingerprintofRawBytes(byte[] hashBytes) toString()Returns a string representation of this record class.
-
Field Details
-
FINGERPRINT_BITS
public static final int FINGERPRINT_BITS- See Also:
-
FINGERPRINT_BYTES
public static final int FINGERPRINT_BYTES- See Also:
-
FINGERPRINT_CONTEXT
public static final byte[] FINGERPRINT_CONTEXT
-
-
Constructor Details
-
TokenFingerprint
public TokenFingerprint(byte[] hashBytes) Creates an instance of aTokenFingerprintrecord class.- Parameters:
hashBytes- the value for thehashBytesrecord component
-
-
Method Details
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toHexString
-
toDelimitedHexString
-
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. -
of
-
ofRawBytes
-
ofHex
-
hashBytes
public byte[] hashBytes()Returns the value of thehashBytesrecord component.- Returns:
- the value of the
hashBytesrecord component
-