<PackageReference Include="BouncyCastle.Cryptography" Version="2.0.0" />

TlsBlockCipher

public class TlsBlockCipher : TlsCipher
A generic TLS 1.0-1.2 block cipher. This can be used for AES or 3DES for example.
protected readonly bool m_acceptExtraPadding

protected readonly bool m_encryptThenMac

protected readonly byte[] m_randomData

protected readonly TlsSuiteMac m_readMac

protected readonly bool m_useExplicitIV

protected readonly bool m_useExtraPadding

protected readonly TlsSuiteMac m_writeMac

public virtual bool UsesOpaqueRecordType { get; }

public TlsBlockCipher(TlsCryptoParameters cryptoParams, TlsBlockCipherImpl encryptCipher, TlsBlockCipherImpl decryptCipher, TlsHmac clientMac, TlsHmac serverMac, int cipherKeySize)

protected virtual int CheckPaddingConstantTime(byte[] buf, int off, int len, int blockSize, int macSize)

protected virtual int ChooseExtraPadBlocks(int max)

public virtual TlsDecodeResult DecodeCiphertext(long seqNo, short recordType, ProtocolVersion recordVersion, byte[] ciphertext, int offset, int len)

public virtual TlsEncodeResult EncodePlaintext(long seqNo, short contentType, ProtocolVersion recordVersion, int headerAllocation, byte[] plaintext, int offset, int len)

public virtual int GetCiphertextDecodeLimit(int plaintextLimit)

public virtual int GetCiphertextEncodeLimit(int plaintextLength, int plaintextLimit)

protected virtual int GetCiphertextLength(int blockSize, int macSize, int maxPadding, int plaintextLength)

public virtual int GetPlaintextLimit(int ciphertextLimit)

public virtual void RekeyDecoder()

public virtual void RekeyEncoder()