Record Class TokenDigestRecord
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.token.TokenDigestRecord
Persisted half of a
SelectorVerifierToken: the non-secret
selector plus the digest of the verifier.
Defensive-copies the digest on construction. toString()
never exposes the digest bytes (CWE-522 / CWE-209).
-
Constructor Summary
ConstructorsConstructorDescriptionTokenDigestRecord(String selector, byte[] verifierDigest) Creates an instance of aTokenDigestRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns a fresh copy of the digest bytes.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.selector()Returns the value of theselectorrecord component.toString()Returns a string representation of this record class.byte[]Returns the value of theverifierDigestrecord component.
-
Constructor Details
-
TokenDigestRecord
Creates an instance of aTokenDigestRecordrecord class.- Parameters:
selector- the value for theselectorrecord componentverifierDigest- the value for theverifierDigestrecord component
-
-
Method Details
-
copyVerifierDigest
public byte[] copyVerifierDigest()Returns a fresh copy of the digest bytes. -
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
-
toString
-
selector
Returns the value of theselectorrecord component.- Returns:
- the value of the
selectorrecord component
-
verifierDigest
public byte[] verifierDigest()Returns the value of theverifierDigestrecord component.- Returns:
- the value of the
verifierDigestrecord component
-