public class WrappedSignedProperty extends AbstractWrapper
handle, handleType| Constructor and Description |
|---|
WrappedSignedProperty(String name,
String value,
String signature)
Construct a new wrapped signed property from the given values.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
static WrappedSignedProperty |
fromHandle(Object handle)
Construct a new signed property from a given NMS property.
|
static WrappedSignedProperty |
fromValues(String name,
String value,
String signature)
Construct a new wrapped signed property from the given values.
|
String |
getName()
Retrieve the name of the underlying property, such as "textures".
|
String |
getSignature()
Retrieve the signature of the property (base64) as returned by the session server's /hasJoined.
|
String |
getValue()
Retrieve the value of the property (base64) as return by the session server's /hasJoined
|
int |
hashCode() |
boolean |
hasSignature()
Determine if this property has a signature.
|
boolean |
isSignatureValid(PublicKey key)
Determine if the signature of this property is valid and signed by the corresponding private key.
|
String |
toString() |
getHandle, getHandleType, setHandlepublic static WrappedSignedProperty fromHandle(Object handle)
handle - - the property.public static WrappedSignedProperty fromValues(String name, String value, String signature)
name - - the name of the property.value - - the value of the property.signature - - the BASE64-encoded signature of the value.public String getName()
public String getSignature()
public String getValue()
public boolean hasSignature()
public boolean isSignatureValid(PublicKey key)
key - - the public key.public int hashCode()
hashCode in class AbstractWrapperpublic boolean equals(Object object)
equals in class AbstractWrapperpublic String toString()
toString in class AbstractWrapperCopyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.