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

AeadUtilities

public static class AeadUtilities
public static int GetAuthTagLength(AeadAlgorithmTag aeadAlgorithm)

Return the length of the authentication tag used by the given AEAD algorithm, in octets.

public static int GetIVLength(AeadAlgorithmTag aeadAlgorithm)

Return the length of the IV used by the given AEAD algorithm, in octets.

public static byte[][] SplitMessageKeyAndIv(byte[] messageKeyAndIv, SymmetricKeyAlgorithmTag symKeyAlgorithm, AeadAlgorithmTag aeadAlgorithm)

Split a given byte array containing m bytes of key and n-8 bytes of IV into two separate byte arrays.