Package nxt.crypto
Class AnonymouslyEncryptedData
java.lang.Object
nxt.crypto.AnonymouslyEncryptedData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(byte[] privateKey) byte[]decrypt(byte[] keySeed, byte[] theirPublicKey) static AnonymouslyEncryptedDataencrypt(byte[] plaintext, byte[] privateKey, byte[] theirPublicKey, byte[] nonce) byte[]getBytes()byte[]getData()byte[]intgetSize()static AnonymouslyEncryptedDatareadEncryptedData(byte[] bytes) static AnonymouslyEncryptedDatareadEncryptedData(ByteBuffer buffer, int length, int maxLength) toString()
-
Constructor Details
-
AnonymouslyEncryptedData
public AnonymouslyEncryptedData(byte[] data, byte[] publicKey)
-
-
Method Details
-
encrypt
public static AnonymouslyEncryptedData encrypt(byte[] plaintext, byte[] privateKey, byte[] theirPublicKey, byte[] nonce) -
readEncryptedData
public static AnonymouslyEncryptedData readEncryptedData(ByteBuffer buffer, int length, int maxLength) throws NxtException.NotValidException - Throws:
NxtException.NotValidException
-
readEncryptedData
-
decrypt
public byte[] decrypt(byte[] privateKey) -
decrypt
public byte[] decrypt(byte[] keySeed, byte[] theirPublicKey) -
getData
public byte[] getData() -
getPublicKey
public byte[] getPublicKey() -
getSize
public int getSize() -
getBytes
public byte[] getBytes() -
toString
-