| Modifier and Type | Field and Description |
|---|---|
protected TlsContext |
context |
protected ChaCha7539Engine |
decryptCipher |
protected byte[] |
decryptIV |
protected ChaCha7539Engine |
encryptCipher |
protected byte[] |
encryptIV |
| Constructor and Description |
|---|
Chacha20Poly1305(TlsContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
calculateNonce(long seqNo,
byte[] iv) |
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 KeyParameter |
generateRecordMACKey(StreamCipher cipher) |
protected byte[] |
getAdditionalData(long seqNo,
short type,
int len) |
int |
getPlaintextLimit(int ciphertextLimit) |
protected KeyParameter |
initRecord(StreamCipher cipher,
boolean forEncryption,
long seqNo,
byte[] iv) |
protected void |
updateRecordMACLength(Mac mac,
int len) |
protected void |
updateRecordMACText(Mac mac,
byte[] buf,
int off,
int len) |
protected TlsContext context
protected ChaCha7539Engine encryptCipher
protected ChaCha7539Engine decryptCipher
protected byte[] encryptIV
protected byte[] decryptIV
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 initRecord(StreamCipher cipher, boolean forEncryption, long seqNo, byte[] iv)
protected byte[] calculateNonce(long seqNo,
byte[] iv)
protected KeyParameter generateRecordMACKey(StreamCipher cipher)
protected byte[] calculateRecordMAC(KeyParameter macKey, byte[] additionalData, byte[] buf, int off, int len)
protected void updateRecordMACLength(Mac mac, int len)
protected void updateRecordMACText(Mac mac, byte[] buf, int off, int len)
protected byte[] getAdditionalData(long seqNo,
short type,
int len)
throws IOException
IOExceptionCopyright © 2015–2020 The veraPDF Consortium. All rights reserved.