Package com.neilalexander.jnacl
Class NaCl
java.lang.Object
com.neilalexander.jnacl.NaCl
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
private byte[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
asHex
(byte[] buf) static String
asHex
(int[] buf) byte[]
decrypt
(byte[] input, byte[] nonce) byte[]
decrypt
(byte[] input, int inputlength, byte[] nonce) byte[]
encrypt
(byte[] input, byte[] nonce) byte[]
encrypt
(byte[] input, int inputlength, byte[] nonce) static byte[]
-
Field Details
-
crypto_secretbox_KEYBYTES
static final int crypto_secretbox_KEYBYTES- See Also:
-
crypto_secretbox_NONCEBYTES
static final int crypto_secretbox_NONCEBYTES- See Also:
-
crypto_secretbox_ZEROBYTES
static final int crypto_secretbox_ZEROBYTES- See Also:
-
crypto_secretbox_BOXZEROBYTES
static final int crypto_secretbox_BOXZEROBYTES- See Also:
-
crypto_secretbox_BEFORENMBYTES
static final int crypto_secretbox_BEFORENMBYTES- See Also:
-
precomputed
private byte[] precomputed
-
-
Constructor Details
-
Method Details
-
encrypt
public byte[] encrypt(byte[] input, byte[] nonce) -
encrypt
public byte[] encrypt(byte[] input, int inputlength, byte[] nonce) -
decrypt
public byte[] decrypt(byte[] input, byte[] nonce) -
decrypt
public byte[] decrypt(byte[] input, int inputlength, byte[] nonce) -
getBinary
-
asHex
-
asHex
-