Package com.comphenix.protocol.wrappers
Class WrappedSaltedSignature
java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedSaltedSignature
Wrapper representing the signature data associated to signed data by the player. This includes signed chat messages
and login encryption acknowledgments.
-
Field Summary
Fields inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
handle, handleType -
Constructor Summary
ConstructorsConstructorDescriptionWrappedSaltedSignature(long salt, byte[] signature) Construct a wrapper and NMS handle containing the given valuesWrappedSaltedSignature(Object handle) Construct a wrapper from a NMS handle -
Method Summary
Modifier and TypeMethodDescriptionlonggetSalt()byte[]byte[]booleanisSigned()voidsetSalt(long salt) voidsetSignature(byte[] signature) Methods inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
equals, getHandle, getHandleType, hashCode, setHandle, toString
-
Constructor Details
-
WrappedSaltedSignature
Construct a wrapper from a NMS handle- Parameters:
handle- NMS Signature object
-
WrappedSaltedSignature
public WrappedSaltedSignature(long salt, byte[] signature) Construct a wrapper and NMS handle containing the given values- Parameters:
salt- salt/nonce for this signaturesignature- binary cryptographic signature
-
-
Method Details
-
isSigned
public boolean isSigned()- Returns:
- if a cryptographic signature data is present
-
getSalt
public long getSalt()- Returns:
- cryptographic salt/nonce
-
setSalt
public void setSalt(long salt) - Parameters:
salt- cryptographic salt/nonce
-
getSignature
public byte[] getSignature()- Returns:
- binary signature data associated to the salt and message
-
setSignature
public void setSignature(byte[] signature) - Parameters:
signature- binary signature data associated to the salt and message
-
getSaltBytes
public byte[] getSaltBytes()- Returns:
- the long salt represented in 8 bytes
-