Interface IdentifiedKey
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIdentifiedKey.RevisionThe different versions of player keys, per Minecraft version.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IdentifiedKey.RevisiongetKeyRevision()Retrieves the key revision.@Nullable UUIDgetSignatureHolder()Retrieves the signature holders UUID.PublicKeygetSignedPublicKey()Returns RSA public key.booleanverifyDataSignature(byte[] signature, byte[]... toVerify)Validates a signature against this public key.-
Methods inherited from interface com.velocitypowered.api.proxy.crypto.KeySigned
getExpiryTemporal, getSalt, getSignature, getSigner, hasExpired, isSignatureValid
-
-
-
-
Method Detail
-
getSignedPublicKey
PublicKey getSignedPublicKey()
Returns RSA public key. Note: this key is at least 2048 bits but may be larger.- Returns:
- the RSA public key in question
-
verifyDataSignature
boolean verifyDataSignature(byte[] signature, byte[]... toVerify)Validates a signature against this public key.- Parameters:
signature- the signature datatoVerify- the signed data- Returns:
- validity of the signature
-
getSignatureHolder
@Nullable UUID getSignatureHolder()
Retrieves the signature holders UUID. Returns null before theLoginEvent.- Returns:
- the holder UUID or null if not present
-
getKeyRevision
IdentifiedKey.Revision getKeyRevision()
Retrieves the key revision.- Returns:
- the key revision
-
-