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

Org.BouncyCastle.Crypto.Modes.ChaCha20Poly1305

public class ChaCha20Poly1305 : IAeadCipher
Implementation of the ChaCha20-Poly1305 AEAD construction as defined in RFC 7539 / RFC 8439.
namespace Org.BouncyCastle.Crypto.Modes { public class ChaCha20Poly1305 : IAeadCipher { public virtual string AlgorithmName { get; } public ChaCha20Poly1305(); public ChaCha20Poly1305(IMac poly1305); protected ChaCha20Poly1305(ChaCha7539Engine chacha20, IMac poly1305, int nonceSize); public virtual void Init(bool forEncryption, ICipherParameters parameters); public virtual int GetOutputSize(int len); public virtual int GetUpdateOutputSize(int len); public virtual void ProcessAadByte(byte input); public virtual void ProcessAadBytes(byte[] inBytes, int inOff, int len); public virtual int ProcessByte(byte input, byte[] outBytes, int outOff); public virtual int ProcessBytes(byte[] inBytes, int inOff, int len, byte[] outBytes, int outOff); public virtual int DoFinal(byte[] outBytes, int outOff); public virtual byte[] GetMac(); public virtual void Reset(); } }