Package nxt.crypto
Class AnonymouslyEncryptedData
- java.lang.Object
-
- nxt.crypto.AnonymouslyEncryptedData
-
public final class AnonymouslyEncryptedData extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AnonymouslyEncryptedData(byte[] data, byte[] publicKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decrypt(byte[] keySeed, byte[] theirPublicKey)byte[]decrypt(java.lang.String secretPhrase)static AnonymouslyEncryptedDataencrypt(byte[] plaintext, java.lang.String secretPhrase, byte[] theirPublicKey, byte[] nonce)byte[]getBytes()byte[]getData()byte[]getPublicKey()intgetSize()static AnonymouslyEncryptedDatareadEncryptedData(byte[] bytes)static AnonymouslyEncryptedDatareadEncryptedData(java.nio.ByteBuffer buffer, int length, int maxLength)java.lang.StringtoString()
-
-
-
Method Detail
-
encrypt
public static AnonymouslyEncryptedData encrypt(byte[] plaintext, java.lang.String secretPhrase, byte[] theirPublicKey, byte[] nonce)
-
readEncryptedData
public static AnonymouslyEncryptedData readEncryptedData(java.nio.ByteBuffer buffer, int length, int maxLength) throws NxtException.NotValidException
- Throws:
NxtException.NotValidException
-
readEncryptedData
public static AnonymouslyEncryptedData readEncryptedData(byte[] bytes)
-
decrypt
public byte[] decrypt(java.lang.String secretPhrase)
-
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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-