Package com.neilalexander.jnacl
Class NaCl
- java.lang.Object
-
- com.neilalexander.jnacl.NaCl
-
public class NaCl extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
crypto_secretbox_BEFORENMBYTES
(package private) static int
crypto_secretbox_BOXZEROBYTES
(package private) static int
crypto_secretbox_KEYBYTES
(package private) static int
crypto_secretbox_NONCEBYTES
(package private) static int
crypto_secretbox_ZEROBYTES
private byte[]
precomputed
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
asHex(byte[] buf)
static java.lang.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[]
getBinary(java.lang.String s)
-
-
-
Field Detail
-
crypto_secretbox_KEYBYTES
static final int crypto_secretbox_KEYBYTES
- See Also:
- Constant Field Values
-
crypto_secretbox_NONCEBYTES
static final int crypto_secretbox_NONCEBYTES
- See Also:
- Constant Field Values
-
crypto_secretbox_ZEROBYTES
static final int crypto_secretbox_ZEROBYTES
- See Also:
- Constant Field Values
-
crypto_secretbox_BOXZEROBYTES
static final int crypto_secretbox_BOXZEROBYTES
- See Also:
- Constant Field Values
-
crypto_secretbox_BEFORENMBYTES
static final int crypto_secretbox_BEFORENMBYTES
- See Also:
- Constant Field Values
-
precomputed
private byte[] precomputed
-
-
Method Detail
-
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
public static byte[] getBinary(java.lang.String s)
-
asHex
public static java.lang.String asHex(byte[] buf)
-
asHex
public static java.lang.String asHex(int[] buf)
-
-