| Modifier and Type | Field and Description |
|---|---|
protected TlsContext |
context |
protected ChaChaEngine |
decryptCipher |
protected ChaChaEngine |
encryptCipher |
| Constructor and Description |
|---|
Chacha20Poly1305(TlsContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
calculateRecordMAC(KeyParameter macKey,
byte[] additionalData,
byte[] buf,
int off,
int len) |
byte[] |
decodeCiphertext(long seqNo,
short type,
byte[] ciphertext,
int offset,
int len) |
byte[] |
encodePlaintext(long seqNo,
short type,
byte[] plaintext,
int offset,
int len) |
protected byte[] |
getAdditionalData(long seqNo,
short type,
int len) |
int |
getPlaintextLimit(int ciphertextLimit) |
protected KeyParameter |
initRecordMAC(ChaChaEngine cipher,
boolean forEncryption,
long seqNo) |
protected void |
updateRecordMAC(Mac mac,
byte[] buf,
int off,
int len) |
protected TlsContext context
protected ChaChaEngine encryptCipher
protected ChaChaEngine decryptCipher
public Chacha20Poly1305(TlsContext context) throws java.io.IOException
java.io.IOExceptionpublic int getPlaintextLimit(int ciphertextLimit)
getPlaintextLimit in interface TlsCipherpublic byte[] encodePlaintext(long seqNo,
short type,
byte[] plaintext,
int offset,
int len)
throws java.io.IOException
encodePlaintext in interface TlsCipherjava.io.IOExceptionpublic byte[] decodeCiphertext(long seqNo,
short type,
byte[] ciphertext,
int offset,
int len)
throws java.io.IOException
decodeCiphertext in interface TlsCipherjava.io.IOExceptionprotected KeyParameter initRecordMAC(ChaChaEngine cipher, boolean forEncryption, long seqNo)
protected byte[] calculateRecordMAC(KeyParameter macKey, byte[] additionalData, byte[] buf, int off, int len)
protected void updateRecordMAC(Mac mac, byte[] buf, int off, int len)
protected byte[] getAdditionalData(long seqNo,
short type,
int len)
throws java.io.IOException
java.io.IOException