java.lang.Object
xbr.network.crypto.SecretBox
public class SecretBox
extends java.lang.Object
-
Constructor Summary
Constructors
| Constructor |
Description |
SecretBox(byte[] key) |
|
-
Method Summary
| Modifier and Type |
Method |
Description |
byte[] |
decrypt(byte[] ciphertext) |
|
byte[] |
decrypt(byte[] nonce,
byte[] ciphertext) |
|
byte[] |
encrypt(byte[] message) |
|
byte[] |
encrypt(byte[] nonce,
byte[] message) |
|
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
public SecretBox(byte[] key)
-
Method Details
-
public byte[] encrypt(byte[] message)
-
public byte[] encrypt(byte[] nonce,
byte[] message)
-
public byte[] decrypt(byte[] ciphertext)
-
public byte[] decrypt(byte[] nonce,
byte[] ciphertext)