Record Class RootKey
java.lang.Object
java.lang.Record
com.iizix.license.v2.RootKey
- Record Components:
kid- The key ID, of the formKeyCertificate.KEY_ID_PATTERN.key- The Ed25519 public key.
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.keyText()Gets the key as text.kid()Returns the value of thekidrecord component.static RootKeyCreates a root from its key ID and key text, the form a pinned constant is written in.toString()The key ID and the key text.
Constructor Details
RootKey
Validates the components.- Throws:
IllegalArgumentException- If the key ID is malformed or the key is not an Ed25519 public key on the curve.
Method Details
of
Creates a root from its key ID and key text, the form a pinned constant is written in.- Parameters:
kid- The key ID.text- The public key asEd25519.publicKeyToBase64Url(PublicKey)writes it.- Returns:
- The root.
- Throws:
IllegalArgumentException- If the key ID is malformed or the text is not an Ed25519 public key.
keyText
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).kid
key