| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| public static final int | |
| protected int[] | |
| private int | |
| private boolean | |
| private byte[] | |
| protected int | |
| protected static final byte[] | sigma
Deprecated
|
| private static final int | STATE_SIZE
Constants |
| protected static final byte[] | tau
Deprecated
|
| private static final int[] | |
| protected int[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Salsa20Engine(int
the number of rounds (must be an even number). rounds)Creates a Salsa20 engine with a specific number of rounds. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| protected void | |
| public String | getAlgorithmName()
Implements org. |
| protected long | |
| protected int | |
| public long | getPosition()
Implements org. |
| public void | init(boolean
whether or not we are for encryption. forEncryption, CipherParameters the parameters required to set up the cipher. params)Implements org. |
| private boolean | |
| private boolean | |
| protected void | |
| public int | processBytes(byte[]
the input byte array. in, int the offset into the in array where the data to be processed starts. inOff, int the number of bytes to be processed. len, byte[] the output buffer the processed bytes go into. out, int the offset into the output byte array the processed data starts at. outOff)Implements org. |
| public void | |
| protected void | |
| private void | |
| protected void | |
| protected void | |
| public byte | returnByte(byte
the byte to be processed. in)Implements org. |
| public static void | |
| public long | seekTo(long
the number of bytes in to set the cipher state to. position)Implements org. |
| protected void | |
| public long | skip(long
the number of bytes to skip (positive forward, negative backwards). numberOfBytes)Implements org. |
| cW0 | back to summary |
|---|---|
| private int cW0 | |
| cW1 | back to summary |
|---|---|
| private int cW1 | |
| cW2 | back to summary |
|---|---|
| private int cW2 | |
| DEFAULT_ROUNDS | back to summary |
|---|---|
| public static final int DEFAULT_ROUNDS | |
| engineState | back to summary |
|---|---|
| protected int[] engineState | |
| index | back to summary |
|---|---|
| private int index | |
| initialised | back to summary |
|---|---|
| private boolean initialised | |
| keyStream | back to summary |
|---|---|
| private byte[] keyStream | |
| rounds | back to summary |
|---|---|
| protected int rounds | |
| sigma | back to summary |
|---|---|
| protected static final byte[] sigma
Deprecated
| |
| STATE_SIZE | back to summary |
|---|---|
| private static final int STATE_SIZE Constants | |
| tau | back to summary |
|---|---|
| protected static final byte[] tau
Deprecated
| |
| TAU_SIGMA | back to summary |
|---|---|
| private static final int[] TAU_SIGMA | |
| x | back to summary |
|---|---|
| protected int[] x | |
| Salsa20Engine | back to summary |
|---|---|
| public Salsa20Engine() Creates a 20 round Salsa20 engine. | |
| Salsa20Engine | back to summary |
|---|---|
| public Salsa20Engine(int rounds) Creates a Salsa20 engine with a specific number of rounds.
| |
| advanceCounter | back to summary |
|---|---|
| protected void advanceCounter(long diff) | |
| advanceCounter | back to summary |
|---|---|
| protected void advanceCounter() | |
| generateKeyStream | back to summary |
|---|---|
| protected void generateKeyStream(byte[] output) | |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. Return the name of the algorithm the cipher implements.
| |
| getCounter | back to summary |
|---|---|
| protected long getCounter() | |
| getNonceSize | back to summary |
|---|---|
| protected int getNonceSize() | |
| getPosition | back to summary |
|---|---|
| public long getPosition() Implements org. Doc from org. Return the current "position" of the cipher
| |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters params) Implements org. initialise a Salsa20 cipher.
| |
| limitExceeded | back to summary |
|---|---|
| private boolean limitExceeded() | |
| limitExceeded | back to summary |
|---|---|
| private boolean limitExceeded(int len) | |
| packTauOrSigma | back to summary |
|---|---|
| protected void packTauOrSigma(int keyLength, int[] state, int stateOffset) | |
| processBytes | back to summary |
|---|---|
| public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) Implements org. Doc from org. process a block of bytes from in putting the result into out.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. reset the cipher. This leaves it in the same state it was at after the last init (if there was one). | |
| resetCounter | back to summary |
|---|---|
| protected void resetCounter() | |
| resetLimitCounter | back to summary |
|---|---|
| private void resetLimitCounter() | |
| retreatCounter | back to summary |
|---|---|
| protected void retreatCounter(long diff) | |
| retreatCounter | back to summary |
|---|---|
| protected void retreatCounter() | |
| returnByte | back to summary |
|---|---|
| public byte returnByte(byte in) Implements org. Doc from org. encrypt/decrypt a single byte returning the result.
| |
| salsaCore | back to summary |
|---|---|
| public static void salsaCore(int rounds, int[] input, int[] x) Salsa20 function
| |
| seekTo | back to summary |
|---|---|
| public long seekTo(long position) Implements org. Doc from org. Reset the cipher and then skip forward to a given position.
| |
| setKey | back to summary |
|---|---|
| protected void setKey(byte[] keyBytes, byte[] ivBytes) | |
| skip | back to summary |
|---|---|
| public long skip(long numberOfBytes) Implements org. Doc from org. Skip numberOfBytes forwards, or backwards.
| |