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

TlsAeadCipher

A generic TLS 1.2 AEAD cipher.
public const int AEAD_CCM = 1

public const int AEAD_CHACHA20_POLY1305 = 2

public const int AEAD_GCM = 3

protected readonly byte[] m_decryptConnectionID

protected readonly byte[] m_decryptNonce

protected readonly bool m_decryptUseInnerPlaintext

protected readonly byte[] m_encryptConnectionID

protected readonly byte[] m_encryptNonce

protected readonly bool m_encryptUseInnerPlaintext

protected readonly int m_fixed_iv_length

protected readonly bool m_isTlsV13

protected readonly int m_keySize

protected readonly int m_macSize

protected readonly int m_nonceMode

protected readonly int m_record_iv_length

public virtual bool UsesOpaqueRecordType { get; }

public TlsAeadCipher(TlsCryptoParameters cryptoParams, TlsAeadCipherImpl encryptCipher, TlsAeadCipherImpl decryptCipher, int keySize, int macSize, int aeadType)

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

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

protected virtual byte[] GetAdditionalData(long seqNo, short recordType, ProtocolVersion recordVersion, int ciphertextLength, int plaintextLength)

protected virtual byte[] GetAdditionalData(long seqNo, short recordType, ProtocolVersion recordVersion, int ciphertextLength, int plaintextLength, byte[] connectionID)

public virtual int GetCiphertextDecodeLimit(int plaintextLimit)

public virtual int GetCiphertextEncodeLimit(int plaintextLength, int plaintextLimit)

public virtual int GetPlaintextDecodeLimit(int ciphertextLimit)

public virtual int GetPlaintextEncodeLimit(int ciphertextLimit)

public virtual int GetPlaintextLimit(int ciphertextLimit)

protected virtual void RekeyCipher(SecurityParameters securityParameters, TlsAeadCipherImpl cipher, byte[] nonce, bool serverSecret)

public virtual void RekeyDecoder()

public virtual void RekeyEncoder()

protected virtual void Setup13Cipher(TlsAeadCipherImpl cipher, byte[] nonce, TlsSecret secret, int cryptoHashAlgorithm)