Package com.neilalexander.jnacl.crypto
Class salsa20
- java.lang.Object
-
- com.neilalexander.jnacl.crypto.salsa20
-
public class salsa20 extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
crypto_core_salsa20_ref_CONSTBYTES
(package private) int
crypto_core_salsa20_ref_INPUTBYTES
(package private) int
crypto_core_salsa20_ref_KEYBYTES
(package private) int
crypto_core_salsa20_ref_OUTPUTBYTES
(package private) int
crypto_stream_salsa20_ref_KEYBYTES
(package private) int
crypto_stream_salsa20_ref_NONCEBYTES
(package private) static int
ROUNDS
-
Constructor Summary
Constructors Constructor Description salsa20()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
crypto_core(byte[] outv, byte[] inv, byte[] k, byte[] c)
static int
crypto_stream(byte[] c, int clen, byte[] n, int noffset, byte[] k)
static int
crypto_stream_xor(byte[] c, byte[] m, int mlen, byte[] n, int noffset, byte[] k)
(package private) static int
load_littleendian(byte[] x, int offset)
(package private) static long
rotate(int u, int c)
(package private) static void
store_littleendian(byte[] x, int offset, int u)
-
-
-
Field Detail
-
crypto_core_salsa20_ref_OUTPUTBYTES
final int crypto_core_salsa20_ref_OUTPUTBYTES
- See Also:
- Constant Field Values
-
crypto_core_salsa20_ref_INPUTBYTES
final int crypto_core_salsa20_ref_INPUTBYTES
- See Also:
- Constant Field Values
-
crypto_core_salsa20_ref_KEYBYTES
final int crypto_core_salsa20_ref_KEYBYTES
- See Also:
- Constant Field Values
-
crypto_core_salsa20_ref_CONSTBYTES
final int crypto_core_salsa20_ref_CONSTBYTES
- See Also:
- Constant Field Values
-
crypto_stream_salsa20_ref_KEYBYTES
final int crypto_stream_salsa20_ref_KEYBYTES
- See Also:
- Constant Field Values
-
crypto_stream_salsa20_ref_NONCEBYTES
final int crypto_stream_salsa20_ref_NONCEBYTES
- See Also:
- Constant Field Values
-
ROUNDS
static final int ROUNDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
rotate
static long rotate(int u, int c)
-
load_littleendian
static int load_littleendian(byte[] x, int offset)
-
store_littleendian
static void store_littleendian(byte[] x, int offset, int u)
-
crypto_core
public static int crypto_core(byte[] outv, byte[] inv, byte[] k, byte[] c)
-
crypto_stream
public static int crypto_stream(byte[] c, int clen, byte[] n, int noffset, byte[] k)
-
crypto_stream_xor
public static int crypto_stream_xor(byte[] c, byte[] m, int mlen, byte[] n, int noffset, byte[] k)
-
-