| 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 IOException
IOExceptionpublic int getPlaintextLimit(int ciphertextLimit)
getPlaintextLimit in interface TlsCipherpublic byte[] encodePlaintext(long seqNo,
short type,
byte[] plaintext,
int offset,
int len)
throws IOException
encodePlaintext in interface TlsCipherIOExceptionpublic byte[] decodeCiphertext(long seqNo,
short type,
byte[] ciphertext,
int offset,
int len)
throws IOException
decodeCiphertext in interface TlsCipherIOExceptionprotected 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 IOException
IOExceptionCopyright © 2015–2016 The veraPDF Consortium. All rights reserved.