Package nxt.crypto
Class EncryptedData
java.lang.Object
nxt.crypto.EncryptedData
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(byte[] myPrivateKey, byte[] theirPublicKey) static EncryptedDataencrypt(byte[] plaintext, byte[] myPrivateKey, byte[] theirPublicKey) byte[]getBytes()byte[]getData()static intgetEncryptedDataLength(byte[] plaintext) static intgetEncryptedSize(byte[] plaintext) byte[]getNonce()intgetSize()static EncryptedDatareadEncryptedData(byte[] bytes) static EncryptedDatareadEncryptedData(ByteBuffer buffer, int length, int maxLength) toString()
-
Field Details
-
EMPTY_DATA
-
-
Constructor Details
-
EncryptedData
public EncryptedData(byte[] data, byte[] nonce)
-
-
Method Details
-
encrypt
-
readEncryptedData
public static EncryptedData readEncryptedData(ByteBuffer buffer, int length, int maxLength) throws NxtException.NotValidException - Throws:
NxtException.NotValidException
-
readEncryptedData
-
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
-