Class WrappedSaltedSignature

java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedSaltedSignature

public class WrappedSaltedSignature extends AbstractWrapper
Wrapper representing the signature data associated to signed data by the player. This includes signed chat messages and login encryption acknowledgments.
  • Constructor Details

    • WrappedSaltedSignature

      public WrappedSaltedSignature(Object handle)
      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 signature
      signature - 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