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)
Deprecated.
Use version with additional 'usesNonce' argument
|
TlsStreamCipher(TlsContext context,
StreamCipher clientWriteCipher,
StreamCipher serverWriteCipher,
Digest clientWriteDigest,
Digest serverWriteDigest,
int cipherKeySize,
boolean usesNonce) |
Modifier and Type | Method and Description |
---|---|
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 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) throws java.io.IOException
java.io.IOException
public TlsStreamCipher(TlsContext context, StreamCipher clientWriteCipher, StreamCipher serverWriteCipher, Digest clientWriteDigest, Digest serverWriteDigest, int cipherKeySize, boolean usesNonce) throws java.io.IOException
java.io.IOException
public int getPlaintextLimit(int ciphertextLimit)
getPlaintextLimit
in interface TlsCipher
public byte[] encodePlaintext(long seqNo, short type, byte[] plaintext, int offset, int len)
encodePlaintext
in interface TlsCipher
public byte[] decodeCiphertext(long seqNo, short type, byte[] ciphertext, int offset, int len) throws java.io.IOException
decodeCiphertext
in interface TlsCipher
java.io.IOException