| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private long | |
| private final byte[] | |
| private static final int | |
| private int | |
| private final ChaCha7539Engine | |
| private static final long | |
| private long | |
| private byte[] | |
| private final byte[] | |
| private static final int | |
| private final byte[] | |
| private static final int | |
| private final byte[] | |
| private static final int | |
| private final Mac | |
| private int | |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public int | doFinal(byte[]
space for any resulting output data. out, int offset into out to start copying the data at. outOff)Implements org. Finish the operation either appending or verifying the MAC at the end of the data. |
| private void | |
| private void | |
| public String | getAlgorithmName()
Implements org. Return the name of the algorithm. |
| public byte[] | getMac()
Implements org. Return the value of the MAC associated with the last stream processed. |
| public int | getOutputSize(int
the length of the input. len)Implements org. return the size of the output buffer required for a processBytes plus a doFinal with an input of len bytes. |
| public int | getUpdateOutputSize(int
the length of the input. len)Implements org. return the size of the output buffer required for a processBytes an input of len bytes. |
| private long | |
| public void | init(boolean
true if we are setting up for encryption, false otherwise. forEncryption, CipherParameters the necessary parameters for the underlying cipher to be initialised. params)Implements org. initialise the underlying cipher. |
| private void | |
| private void | |
| public void | processAADByte(byte
the byte to be processed. in)Implements org. Add a single byte to the associated data check. |
| public void | processAADBytes(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)Implements org. Add a sequence of bytes to the associated data check. |
| public int | processByte(byte
the byte to be processed. in, byte[] the output buffer the processed byte goes into. out, int the offset into the output byte array the processed data starts at. outOff)Implements org. encrypt/decrypt a single byte. |
| 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. process a block of bytes from in putting the result into out. |
| private void | |
| public void | |
| private void |
| AAD_LIMIT | back to summary |
|---|---|
| private static final long AAD_LIMIT | |
| aadCount | back to summary |
|---|---|
| private long aadCount | |
| buf | back to summary |
|---|---|
| private final byte[] buf | |
| BUF_SIZE | back to summary |
|---|---|
| private static final int BUF_SIZE | |
| bufPos | back to summary |
|---|---|
| private int bufPos | |
| chacha20 | back to summary |
|---|---|
| private final ChaCha7539Engine chacha20 | |
| DATA_LIMIT | back to summary |
|---|---|
| private static final long DATA_LIMIT | |
| dataCount | back to summary |
|---|---|
| private long dataCount | |
| initialAAD | back to summary |
|---|---|
| private byte[] initialAAD | |
| key | back to summary |
|---|---|
| private final byte[] key | |
| KEY_SIZE | back to summary |
|---|---|
| private static final int KEY_SIZE | |
| mac | back to summary |
|---|---|
| private final byte[] mac | |
| MAC_SIZE | back to summary |
|---|---|
| private static final int MAC_SIZE | |
| nonce | back to summary |
|---|---|
| private final byte[] nonce | |
| NONCE_SIZE | back to summary |
|---|---|
| private static final int NONCE_SIZE | |
| poly1305 | back to summary |
|---|---|
| private final Mac poly1305 | |
| state | back to summary |
|---|---|
| private int state | |
| ZEROES | back to summary |
|---|---|
| private static final byte[] ZEROES | |
| ChaCha20Poly1305 | back to summary |
|---|---|
| public ChaCha20Poly1305() | |
| ChaCha20Poly1305 | back to summary |
|---|---|
| public ChaCha20Poly1305(Mac poly1305) | |
| checkAAD | back to summary |
|---|---|
| private void checkAAD() | |
| checkData | back to summary |
|---|---|
| private void checkData() | |
| doFinal | back to summary |
|---|---|
| public int doFinal(byte[] out, int outOff) throws IllegalStateException, InvalidCipherTextException Implements org. Doc from org. Finish the operation either appending or verifying the MAC at the end of the data.
| |
| finishAAD | back to summary |
|---|---|
| private void finishAAD(int nextState) | |
| finishData | back to summary |
|---|---|
| private void finishData(int nextState) | |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. Return the name of the algorithm.
| |
| getMac | back to summary |
|---|---|
| public byte[] getMac() Implements org. Doc from org. Return the value of the MAC associated with the last stream processed.
| |
| getOutputSize | back to summary |
|---|---|
| public int getOutputSize(int len) Implements org. Doc from org. return the size of the output buffer required for a processBytes plus a doFinal with an input of len bytes.
The returned size may be dependent on the initialisation of this cipher
and may not be accurate once subsequent input data is processed - this method
should be invoked immediately prior to a call to final processing of input data
and a call to
| |
| getUpdateOutputSize | back to summary |
|---|---|
| public int getUpdateOutputSize(int len) Implements org. Doc from org. return the size of the output buffer required for a processBytes an input of len bytes. The returned size may be dependent on the initialisation of this cipher and may not be accurate once subsequent input data is processed - this method should be invoked immediately prior to input data being processed.
| |
| incrementCount | back to summary |
|---|---|
| private long incrementCount(long count, int increment, long limit) | |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters params) throws IllegalArgumentException Implements org. Doc from org. initialise the underlying cipher. Parameter can either be an AEADParameters or a ParametersWithIV object.
| |
| initMAC | back to summary |
|---|---|
| private void initMAC() | |
| padMAC | back to summary |
|---|---|
| private void padMAC(long count) | |
| processAADByte | back to summary |
|---|---|
| public void processAADByte(byte in) Implements org. Doc from org. Add a single byte to the associated data check.
| |
| processAADBytes | back to summary |
|---|---|
| public void processAADBytes(byte[] in, int inOff, int len) Implements org. Doc from org. Add a sequence of bytes to the associated data check.
| |
| processByte | back to summary |
|---|---|
| public int processByte(byte in, byte[] out, int outOff) throws DataLengthException Implements org. Doc from org. encrypt/decrypt a single byte.
| |
| processBytes | back to summary |
|---|---|
| public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException Implements org. Doc from org. process a block of bytes from in putting the result into out.
| |
| processData | back to summary |
|---|---|
| private void processData(byte[] in, int inOff, int inLen, byte[] out, int outOff) | |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. Reset the cipher. After resetting the cipher is in the same state as it was after the last init (if there was one). | |
| reset | back to summary |
|---|---|
| private void reset(boolean clearMac, boolean resetCipher) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| private |
| DEC_AAD | back to summary |
|---|---|
| pack-priv static final int DEC_AAD | |
| DEC_DATA | back to summary |
|---|---|
| pack-priv static final int DEC_DATA | |
| DEC_FINAL | back to summary |
|---|---|
| pack-priv static final int DEC_FINAL | |
| DEC_INIT | back to summary |
|---|---|
| pack-priv static final int DEC_INIT | |
| ENC_AAD | back to summary |
|---|---|
| pack-priv static final int ENC_AAD | |
| ENC_DATA | back to summary |
|---|---|
| pack-priv static final int ENC_DATA | |
| ENC_FINAL | back to summary |
|---|---|
| pack-priv static final int ENC_FINAL | |
| ENC_INIT | back to summary |
|---|---|
| pack-priv static final int ENC_INIT | |
| UNINITIALIZED | back to summary |
|---|---|
| pack-priv static final int UNINITIALIZED | |
| State | back to summary |
|---|---|
| private State() | |