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

TlsBlockCipher

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 byte[] m_decryptConnectionID

protected readonly bool m_decryptUseInnerPlaintext

protected readonly byte[] m_encryptConnectionID

protected readonly bool m_encryptThenMac

protected readonly bool m_encryptUseInnerPlaintext

protected readonly byte[] m_randomData

protected readonly TlsSuiteHmac m_readMac

protected readonly bool m_useExplicitIV

protected readonly bool m_useExtraPadding

protected readonly TlsSuiteHmac 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 GetPlaintextDecodeLimit(int ciphertextLimit)

public virtual int GetPlaintextEncodeLimit(int ciphertextLimit)

protected virtual int GetPlaintextLength(int blockSize, int macSize, int ciphertextLength)

public virtual int GetPlaintextLimit(int ciphertextLimit)

public virtual void RekeyDecoder()

public virtual void RekeyEncoder()