Package nxt.crypto

Class EncryptedData

java.lang.Object
nxt.crypto.EncryptedData

public final class EncryptedData extends Object
  • Field Details

  • Constructor Details

    • EncryptedData

      public EncryptedData(byte[] data, byte[] nonce)
  • Method Details

    • encrypt

      public static EncryptedData encrypt(byte[] plaintext, byte[] myPrivateKey, byte[] theirPublicKey)
    • readEncryptedData

      public static EncryptedData readEncryptedData(ByteBuffer buffer, int length, int maxLength) throws NxtException.NotValidException
      Throws:
      NxtException.NotValidException
    • readEncryptedData

      public static EncryptedData readEncryptedData(byte[] bytes)
    • getEncryptedDataLength

      public static int getEncryptedDataLength(byte[] plaintext)
    • getEncryptedSize

      public static int getEncryptedSize(byte[] plaintext)
    • decrypt

      public byte[] decrypt(byte[] myPrivateKey, byte[] theirPublicKey)
    • getData

      public byte[] getData()
    • getNonce

      public byte[] getNonce()
    • getSize

      public int getSize()
    • getBytes

      public byte[] getBytes()
    • toString

      public String toString()
      Overrides:
      toString in class Object