Interface IdentifiedKey
- All Superinterfaces:
KeySigned
Represents session-server cross-signed dated RSA public key.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The different versions of player keys, per Minecraft version. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the key revision.@Nullable UUID
Retrieves the signature holders UUID.Returns RSA public key.boolean
verifyDataSignature
(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 Details
-
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
-