<PackageReference Include="Microsoft.Bcl.Cryptography" Version="11.0.0-preview.2.26159.112" />

Internal.NativeCrypto.Cng

static class Cng
namespace Internal.NativeCrypto { internal static class Cng { public enum OpenAlgorithmProviderFlags { NONE = 0, BCRYPT_ALG_HANDLE_HMAC_FLAG = 8 } public const string BCRYPT_3DES_ALGORITHM = "3DES"; public const string BCRYPT_AES_ALGORITHM = "AES"; public const string BCRYPT_CHACHA20_POLY1305_ALGORITHM = "CHACHA20_POLY1305"; public const string BCRYPT_DES_ALGORITHM = "DES"; public const string BCRYPT_RC2_ALGORITHM = "RC2"; public const string BCRYPT_CHAIN_MODE_CBC = "ChainingModeCBC"; public const string BCRYPT_CHAIN_MODE_ECB = "ChainingModeECB"; public const string BCRYPT_CHAIN_MODE_GCM = "ChainingModeGCM"; public const string BCRYPT_CHAIN_MODE_CFB = "ChainingModeCFB"; public const string BCRYPT_CHAIN_MODE_CCM = "ChainingModeCCM"; public static Internal.NativeCrypto.SafeAlgorithmHandle BCryptOpenAlgorithmProvider(string pszAlgId, string pszImplementation = null, OpenAlgorithmProviderFlags dwFlags = OpenAlgorithmProviderFlags.NONE); public static void SetFeedbackSize(this Internal.NativeCrypto.SafeAlgorithmHandle hAlg, int dwFeedbackSize); public static void SetCipherMode(this Internal.NativeCrypto.SafeAlgorithmHandle hAlg, string cipherMode); public static void SetEffectiveKeyLength(this Internal.NativeCrypto.SafeAlgorithmHandle hAlg, int effectiveKeyLength); } }