public final class EncryptedData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static EncryptedData |
EMPTY_DATA |
Constructor and Description |
---|
EncryptedData(byte[] data,
byte[] nonce) |
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(java.lang.String secretPhrase,
byte[] theirPublicKey) |
static EncryptedData |
encrypt(byte[] plaintext,
java.lang.String secretPhrase,
byte[] theirPublicKey) |
byte[] |
getBytes() |
byte[] |
getData() |
static int |
getEncryptedDataLength(byte[] plaintext) |
static int |
getEncryptedSize(byte[] plaintext) |
byte[] |
getNonce() |
int |
getSize() |
static EncryptedData |
readEncryptedData(byte[] bytes) |
static EncryptedData |
readEncryptedData(java.nio.ByteBuffer buffer,
int length,
int maxLength) |
java.lang.String |
toString() |
public static final EncryptedData EMPTY_DATA
public static EncryptedData encrypt(byte[] plaintext, java.lang.String secretPhrase, byte[] theirPublicKey)
public static EncryptedData readEncryptedData(java.nio.ByteBuffer buffer, int length, int maxLength) throws NxtException.NotValidException
NxtException.NotValidException
public static EncryptedData readEncryptedData(byte[] bytes)
public static int getEncryptedDataLength(byte[] plaintext)
public static int getEncryptedSize(byte[] plaintext)
public byte[] decrypt(java.lang.String secretPhrase, byte[] theirPublicKey)
public byte[] getData()
public byte[] getNonce()
public int getSize()
public byte[] getBytes()
public java.lang.String toString()
toString
in class java.lang.Object