Class TlsStreamCipher
- Namespace
- Enterprises.Org.BouncyCastle.Crypto.Tls
- Assembly
- Enterprises.BouncyCastle.Crypto.dll
public class TlsStreamCipher : TlsCipher
- Inheritance
-
TlsStreamCipher
- Implements
-
- Inherited Members
-
Constructors
TlsStreamCipher(TlsContext, IStreamCipher, IStreamCipher, IDigest, IDigest, int, bool)
public TlsStreamCipher(TlsContext context, IStreamCipher clientWriteCipher, IStreamCipher serverWriteCipher, IDigest clientWriteDigest, IDigest serverWriteDigest, int cipherKeySize, bool usesNonce)
Parameters
context TlsContext
clientWriteCipher IStreamCipher
serverWriteCipher IStreamCipher
clientWriteDigest IDigest
serverWriteDigest IDigest
cipherKeySize int
usesNonce bool
Fields
context
protected readonly TlsContext context
Field Value
- TlsContext
decryptCipher
protected readonly IStreamCipher decryptCipher
Field Value
- IStreamCipher
encryptCipher
protected readonly IStreamCipher encryptCipher
Field Value
- IStreamCipher
readMac
protected readonly TlsMac readMac
Field Value
- TlsMac
usesNonce
protected readonly bool usesNonce
Field Value
- bool
writeMac
protected readonly TlsMac writeMac
Field Value
- TlsMac
Methods
CheckMac(long, byte, byte[], int, int, byte[], int, int)
protected virtual void CheckMac(long seqNo, byte type, byte[] recBuf, int recStart, int recEnd, byte[] calcBuf, int calcOff, int calcLen)
Parameters
seqNo long
type byte
recBuf byte[]
recStart int
recEnd int
calcBuf byte[]
calcOff int
calcLen int
DecodeCiphertext(long, byte, byte[], int, int)
public virtual byte[] DecodeCiphertext(long seqNo, byte type, byte[] ciphertext, int offset, int len)
Parameters
seqNo long
type byte
ciphertext byte[]
offset int
len int
Returns
- byte[]
EncodePlaintext(long, byte, byte[], int, int)
public virtual byte[] EncodePlaintext(long seqNo, byte type, byte[] plaintext, int offset, int len)
Parameters
seqNo long
type byte
plaintext byte[]
offset int
len int
Returns
- byte[]
GetPlaintextLimit(int)
public virtual int GetPlaintextLimit(int ciphertextLimit)
Parameters
ciphertextLimit int
Returns
- int
UpdateIV(IStreamCipher, bool, long)
protected virtual void UpdateIV(IStreamCipher cipher, bool forEncryption, long seqNo)
Parameters
cipher IStreamCipher
forEncryption bool
seqNo long