Class TlsBlockCipher
- Namespace
- Enterprises.Org.BouncyCastle.Crypto.Tls
- Assembly
- Enterprises.BouncyCastle.Crypto.dll
public class TlsBlockCipher : TlsCipher
- Inheritance
-
TlsBlockCipher
- Implements
-
- Inherited Members
-
Constructors
TlsBlockCipher(TlsContext, IBlockCipher, IBlockCipher, IDigest, IDigest, int)
public TlsBlockCipher(TlsContext context, IBlockCipher clientWriteCipher, IBlockCipher serverWriteCipher, IDigest clientWriteDigest, IDigest serverWriteDigest, int cipherKeySize)
Parameters
context TlsContext
clientWriteCipher IBlockCipher
serverWriteCipher IBlockCipher
clientWriteDigest IDigest
serverWriteDigest IDigest
cipherKeySize int
Fields
context
protected readonly TlsContext context
Field Value
- TlsContext
decryptCipher
protected readonly IBlockCipher decryptCipher
Field Value
- IBlockCipher
encryptCipher
protected readonly IBlockCipher encryptCipher
Field Value
- IBlockCipher
encryptThenMac
protected readonly bool encryptThenMac
Field Value
- bool
mReadMac
protected readonly TlsMac mReadMac
Field Value
- TlsMac
mWriteMac
protected readonly TlsMac mWriteMac
Field Value
- TlsMac
randomData
protected readonly byte[] randomData
Field Value
- byte[]
useExplicitIV
protected readonly bool useExplicitIV
Field Value
- bool
Properties
ReadMac
public virtual TlsMac ReadMac { get; }
Property Value
- TlsMac
WriteMac
public virtual TlsMac WriteMac { get; }
Property Value
- TlsMac
Methods
CheckPaddingConstantTime(byte[], int, int, int, int)
protected virtual int CheckPaddingConstantTime(byte[] buf, int off, int len, int blockSize, int macSize)
Parameters
buf byte[]
off int
len int
blockSize int
macSize int
Returns
- int
ChooseExtraPadBlocks(SecureRandom, int)
protected virtual int ChooseExtraPadBlocks(SecureRandom r, int max)
Parameters
r SecureRandom
max int
Returns
- 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
LowestBitSet(int)
protected virtual int LowestBitSet(int x)
Parameters
x int
Returns
- int