| Modifier and Type | Field and Description |
|---|---|
protected TlsContext |
context |
protected StreamCipher |
decryptCipher |
protected StreamCipher |
encryptCipher |
protected TlsMac |
readMac |
protected boolean |
usesNonce |
protected TlsMac |
writeMac |
| Constructor and Description |
|---|
TlsStreamCipher(TlsContext context,
StreamCipher clientWriteCipher,
StreamCipher serverWriteCipher,
Digest clientWriteDigest,
Digest serverWriteDigest,
int cipherKeySize,
boolean usesNonce) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkMAC(long seqNo,
short type,
byte[] recBuf,
int recStart,
int recEnd,
byte[] calcBuf,
int calcOff,
int calcLen) |
byte[] |
decodeCiphertext(long seqNo,
short type,
byte[] ciphertext,
int offset,
int len) |
byte[] |
encodePlaintext(long seqNo,
short type,
byte[] plaintext,
int offset,
int len) |
int |
getPlaintextLimit(int ciphertextLimit) |
protected void |
updateIV(StreamCipher cipher,
boolean forEncryption,
long seqNo) |
protected TlsContext context
protected StreamCipher encryptCipher
protected StreamCipher decryptCipher
protected TlsMac writeMac
protected TlsMac readMac
protected boolean usesNonce
public TlsStreamCipher(TlsContext context, StreamCipher clientWriteCipher, StreamCipher serverWriteCipher, Digest clientWriteDigest, Digest serverWriteDigest, int cipherKeySize, boolean usesNonce) throws IOException
IOExceptionpublic int getPlaintextLimit(int ciphertextLimit)
getPlaintextLimit in interface TlsCipherpublic byte[] encodePlaintext(long seqNo,
short type,
byte[] plaintext,
int offset,
int len)
encodePlaintext in interface TlsCipherpublic byte[] decodeCiphertext(long seqNo,
short type,
byte[] ciphertext,
int offset,
int len)
throws IOException
decodeCiphertext in interface TlsCipherIOExceptionprotected void checkMAC(long seqNo,
short type,
byte[] recBuf,
int recStart,
int recEnd,
byte[] calcBuf,
int calcOff,
int calcLen)
throws IOException
IOExceptionprotected void updateIV(StreamCipher cipher, boolean forEncryption, long seqNo)
Copyright © 2015–2021 The veraPDF Consortium. All rights reserved.