| Modifier and Type | Field and Description |
|---|---|
| protected final Cipher | |
| protected SecretKey | |
| protected final int | |
| protected final JcaTlsCrypto | |
| protected final Mac | |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | doFinal(byte[]
any additional data to be included in the MAC calculation. additionalData, byte[] array holding input data to the cipher. input, int offset into input array data starts at. inputOffset, int length of the input data in the array. inputLength, byte[] array to hold the cipher output. output, int offset into output array to start saving output. outputOffset)Implements org. |
| public int | getOutputSize(int
the length (in bytes) of the proposed input. inputLength)Implements org. |
| public void | init(byte[]
the nonce. nonce, int MAC size in bytes. macSize)Implements org. |
| protected void | |
| protected void | |
| public void | setKey(byte[]
array holding the AEAD cipher key. key, int offset into the array the key starts at. keyOff, int length of the key in the array. keyLen)Implements org. |
| protected void |
| cipher | back to summary |
|---|---|
| protected final Cipher cipher | |
| cipherKey | back to summary |
|---|---|
| protected SecretKey cipherKey | |
| cipherMode | back to summary |
|---|---|
| protected final int cipherMode | |
| crypto | back to summary |
|---|---|
| protected final JcaTlsCrypto crypto | |
| mac | back to summary |
|---|---|
| protected final Mac mac | |
| ZEROES | back to summary |
|---|---|
| private static final byte[] ZEROES | |
| JceChaCha20Poly1305 | back to summary |
|---|---|
| public JceChaCha20Poly1305(JcaTlsCrypto crypto, JcaJceHelper helper, boolean isEncrypting) throws GeneralSecurityException | |
| doFinal | back to summary |
|---|---|
| public int doFinal(byte[] additionalData, byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) throws IOException Implements org. Doc from org. Perform the cipher encryption/decryption returning the output in output. Note we have to use doFinal() here as it is the only way to guarantee output from the underlying cipher.
| |
| getOutputSize | back to summary |
|---|---|
| public int getOutputSize(int inputLength) Implements org. Doc from org. Return the maximum size of the output for input of inputLength bytes.
| |
| init | back to summary |
|---|---|
| public void init(byte[] nonce, int macSize) throws IOException Implements org. Doc from org. Initialise the parameters for the AEAD operator.
| |
| initMAC | back to summary |
|---|---|
| protected void initMAC(byte[] firstBlock) throws InvalidKeyException | |
| runCipher | back to summary |
|---|---|
| protected void runCipher(byte[] buf) throws GeneralSecurityException | |
| setKey | back to summary |
|---|---|
| public void setKey(byte[] key, int keyOff, int keyLen) throws IOException Implements org. Doc from org. Set the key to be used by the AEAD cipher implementation supporting this service.
| |
| updateMAC | back to summary |
|---|---|
| protected void updateMAC(byte[] buf, int off, int len) | |