99 references to CipherMode
Microsoft.AspNetCore.DataProtection (1)
Managed\ManagedAuthenticatedEncryptor.cs (1)
145retVal.Mode = CipherMode.CBC;
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
863[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CipherMode))]
netstandard (1)
netstandard.cs (1)
1853[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CipherMode))]
System.Security.Cryptography (85)
System\Security\Cryptography\Aes.cs (1)
20ModeValue = CipherMode.CBC;
System\Security\Cryptography\AesCryptoServiceProvider.cs (1)
53public override CipherMode Mode
System\Security\Cryptography\AesImplementation.cs (8)
52CipherMode.ECB, 73CipherMode.ECB, 95CipherMode.CBC, 117CipherMode.CBC, 142CipherMode.CFB, 167CipherMode.CFB, 198if (Mode == CipherMode.CFB) 219throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\AesImplementation.OpenSsl.cs (15)
11CipherMode cipherMode, 28CipherMode cipherMode, 40private static IntPtr GetAlgorithm(int keySize, int feedback, CipherMode cipherMode) => 45(128, CipherMode.CBC) => Interop.Crypto.EvpAes128Cbc(), 46(128, CipherMode.ECB) => Interop.Crypto.EvpAes128Ecb(), 47(128, CipherMode.CFB) when feedback == 8 => Interop.Crypto.EvpAes128Cfb8(), 48(128, CipherMode.CFB) when feedback == 128 => Interop.Crypto.EvpAes128Cfb128(), 50(192, CipherMode.CBC) => Interop.Crypto.EvpAes192Cbc(), 51(192, CipherMode.ECB) => Interop.Crypto.EvpAes192Ecb(), 52(192, CipherMode.CFB) when feedback == 8 => Interop.Crypto.EvpAes192Cfb8(), 53(192, CipherMode.CFB) when feedback == 128 => Interop.Crypto.EvpAes192Cfb128(), 55(256, CipherMode.CBC) => Interop.Crypto.EvpAes256Cbc(), 56(256, CipherMode.ECB) => Interop.Crypto.EvpAes256Ecb(), 57(256, CipherMode.CFB) when feedback == 8 => Interop.Crypto.EvpAes256Cfb8(), 58(256, CipherMode.CFB) when feedback == 128 => Interop.Crypto.EvpAes256Cfb128(),
System\Security\Cryptography\AesManaged.cs (1)
51public override CipherMode Mode
System\Security\Cryptography\DESCryptoServiceProvider.Unix.cs (1)
76public override CipherMode Mode
System\Security\Cryptography\DesImplementation.cs (8)
80if (Mode == CipherMode.CFB) 103CipherMode.ECB, 124CipherMode.ECB, 146CipherMode.CBC, 168CipherMode.CBC, 193CipherMode.CFB, 218CipherMode.CFB, 237throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\DesImplementation.OpenSsl.cs (6)
11CipherMode cipherMode, 30CipherMode cipherMode, 45private static IntPtr GetAlgorithm(CipherMode cipherMode, int feedbackSize) 49CipherMode.CBC => Interop.Crypto.EvpDesCbc(), 50CipherMode.ECB => Interop.Crypto.EvpDesEcb(), 51CipherMode.CFB when feedbackSize == 1 => Interop.Crypto.EvpDesCfb8(),
System\Security\Cryptography\Helpers.cs (5)
26public static bool UsesIv(this CipherMode cipherMode) 28return cipherMode != CipherMode.ECB; 31public static byte[]? GetCipherIv(this CipherMode cipherMode, byte[]? iv) 323public static int GetPaddingSize(this SymmetricAlgorithm algorithm, CipherMode mode, int feedbackSizeInBits) 325return (mode == CipherMode.CFB ? feedbackSizeInBits : algorithm.BlockSize) / 8;
System\Security\Cryptography\OpenSslCipher.cs (1)
13public OpenSslCipher(IntPtr algorithm, CipherMode cipherMode, int blockSizeInBytes, int paddingSizeInBytes, byte[] key, byte[]? iv, bool encrypting)
System\Security\Cryptography\RC2CryptoServiceProvider.Unix.cs (1)
96public override CipherMode Mode
System\Security\Cryptography\RC2Implementation.cs (8)
73if (Mode == CipherMode.CFB) 93CipherMode.ECB, 117CipherMode.ECB, 142CipherMode.CBC, 167CipherMode.CBC, 188throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB)); 199throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB)); 205throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\RC2Implementation.OpenSsl.cs (5)
11CipherMode cipherMode, 30CipherMode cipherMode, 44private static IntPtr GetAlgorithm(CipherMode cipherMode) => cipherMode switch 46CipherMode.CBC => Interop.Crypto.EvpRC2Cbc(), 47CipherMode.ECB => Interop.Crypto.EvpRC2Ecb(),
System\Security\Cryptography\RijndaelImplementation.cs (1)
70public override CipherMode Mode
System\Security\Cryptography\RijndaelManaged.cs (1)
66public override CipherMode Mode
System\Security\Cryptography\SymmetricAlgorithm.cs (6)
14ModeValue = CipherMode.CBC; 140public virtual CipherMode Mode 149if (!(value == CipherMode.CBC || value == CipherMode.ECB || value == CipherMode.CFB)) 1636protected CipherMode ModeValue;
System\Security\Cryptography\TripleDESCryptoServiceProvider.Wrap.cs (1)
50public override CipherMode Mode
System\Security\Cryptography\TripleDesImplementation.cs (8)
77if (Mode == CipherMode.CFB) 100CipherMode.ECB, 121CipherMode.ECB, 143CipherMode.CBC, 165CipherMode.CBC, 190CipherMode.CFB, 215CipherMode.CFB, 234throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\TripleDesImplementation.OpenSsl.cs (7)
11CipherMode cipherMode, 28CipherMode cipherMode, 48private static IntPtr GetAlgorithm(CipherMode cipherMode, int feedbackSizeInBytes) => cipherMode switch 50CipherMode.CBC => Interop.Crypto.EvpDes3Cbc(), 51CipherMode.ECB => Interop.Crypto.EvpDes3Ecb(), 52CipherMode.CFB when feedbackSizeInBytes == 1 => Interop.Crypto.EvpDes3Cfb8(), 53CipherMode.CFB when feedbackSizeInBytes == 8 => Interop.Crypto.EvpDes3Cfb64(),
System.Security.Cryptography.Pkcs (1)
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (1)
202alg.Mode = CipherMode.CBC;
System.Security.Cryptography.Primitives (1)
System.Security.Cryptography.Primitives.cs (1)
9[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CipherMode))]
System.Security.Cryptography.Xml (9)
System\Security\Cryptography\Xml\EncryptedXml.cs (7)
70private CipherMode _mode; 97_mode = CipherMode.CBC; 157public CipherMode Mode 711CipherMode origMode = symmetricAlgorithm.Mode; 731if (_mode == CipherMode.ECB) 777CipherMode origMode = symmetricAlgorithm.Mode; 783if (_mode != CipherMode.ECB)
System\Security\Cryptography\Xml\SymmetricKeyWrap.cs (2)
136aes.Mode = CipherMode.ECB; 199aes.Mode = CipherMode.ECB;