128 references to CipherMode
Microsoft.AspNetCore.DataProtection (1)
Managed\ManagedAuthenticatedEncryptor.cs (1)
664retVal.Mode = CipherMode.CBC;
Microsoft.DotNet.HotReload.Watch (1)
src\sdk\src\Dotnet.Watch\AspireService\AspireServerService.cs (1)
85aes.Mode = CipherMode.CBC;
mscorlib (1)
src\runtime\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 (113)
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\AesBCryptModes.cs (5)
17internal static SafeAlgorithmHandle GetSharedHandle(CipherMode cipherMode, int feedback) => 22(CipherMode.CBC, _) => s_hAlgCbc.Value, 23(CipherMode.ECB, _) => s_hAlgEcb.Value, 24(CipherMode.CFB, 16) => s_hAlgCfb128.Value, 25(CipherMode.CFB, 1) => s_hAlgCfb8.Value,
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\DESBCryptModes.cs (4)
16internal static SafeAlgorithmHandle GetSharedHandle(CipherMode cipherMode, int feedback) => 21(CipherMode.CBC, _) => s_hAlgCbc.Value, 22(CipherMode.ECB, _) => s_hAlgEcb.Value, 23(CipherMode.CFB, 1) => s_hAlgCfb8.Value,
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\RC2BCryptModes.cs (3)
13internal static SafeAlgorithmHandle GetHandle(CipherMode cipherMode, int effectiveKeyLength) => 20CipherMode.CBC => OpenRC2Algorithm(Cng.BCRYPT_CHAIN_MODE_CBC, effectiveKeyLength), 21CipherMode.ECB => OpenRC2Algorithm(Cng.BCRYPT_CHAIN_MODE_ECB, effectiveKeyLength),
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\TripleDesBCryptModes.cs (5)
21internal static SafeAlgorithmHandle GetSharedHandle(CipherMode cipherMode, int feedback) => 26(CipherMode.CBC, _) => s_hAlgCbc.Value, 27(CipherMode.ECB, _) => s_hAlgEcb.Value, 28(CipherMode.CFB, 1) => s_hAlgCfb8.Value, 29(CipherMode.CFB, 8) => s_hAlgCfb64.Value,
System\Security\Cryptography\Aes.cs (1)
22ModeValue = CipherMode.CBC;
System\Security\Cryptography\AesCng.Windows.cs (8)
142CipherMode.ECB, 160CipherMode.ECB, 179CipherMode.CBC, 198CipherMode.CBC, 218CipherMode.CFB, 238CipherMode.CFB, 266int ICngSymmetricAlgorithm.GetPaddingSize(CipherMode mode, int feedbackSizeBits) 271SafeAlgorithmHandle ICngSymmetricAlgorithm.GetEphemeralModeHandle(CipherMode mode, int feedbackSizeInBits)
System\Security\Cryptography\AesCryptoServiceProvider.cs (1)
53public override CipherMode Mode
System\Security\Cryptography\AesImplementation.cs (8)
104CipherMode.ECB, 127CipherMode.ECB, 152CipherMode.CBC, 177CipherMode.CBC, 205CipherMode.CFB, 233CipherMode.CFB, 269if (Mode == CipherMode.CFB) 290throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\AesImplementation.Windows.cs (2)
12CipherMode cipherMode, 28CipherMode cipherMode,
System\Security\Cryptography\AesManaged.cs (1)
51public override CipherMode Mode
System\Security\Cryptography\BasicSymmetricCipherBCrypt.cs (1)
15public BasicSymmetricCipherBCrypt(SafeAlgorithmHandle algorithm, CipherMode cipherMode, int blockSizeInBytes, int paddingSizeInBytes, ReadOnlySpan<byte> key, bool ownsParentHandle, byte[]? iv, bool encrypting)
System\Security\Cryptography\BasicSymmetricCipherCsp.cs (2)
16public BasicSymmetricCipherCsp(int algId, CipherMode cipherMode, int blockSizeInBytes, byte[] key, bool addNoSaltFlag, byte[]? iv, bool encrypting, int feedbackSize, int paddingSizeInBytes) 25if (cipherMode == CipherMode.CFB)
System\Security\Cryptography\BasicSymmetricCipherLiteNCrypt.cs (4)
33CipherMode cipherMode, 45CipherMode.ECB => s_ECBMode, 46CipherMode.CBC => s_CBCMode, 47CipherMode.CFB => s_CFBMode,
System\Security\Cryptography\BasicSymmetricCipherNCrypt.cs (1)
18public BasicSymmetricCipherNCrypt(Func<CngKey> cngKeyFactory, CipherMode cipherMode, int blockSizeInBytes, byte[]? iv, bool encrypting, int paddingSizeInBytes)
System\Security\Cryptography\CngSymmetricAlgorithmCore.cs (12)
152public ILiteSymmetricCipher CreateLiteSymmetricCipher(ReadOnlySpan<byte> iv, bool encrypting, CipherMode mode, int feedbackSizeInBits) 166CipherMode mode, 195private UniversalCryptoTransform CreateCryptoTransform(byte[] rgbKey, byte[]? rgbIV, bool encrypting, PaddingMode padding, CipherMode mode, int feedbackSizeInBits) 214private UniversalCryptoTransform CreateEphemeralCryptoTransformCore(byte[] key, byte[]? iv, bool encrypting, PaddingMode padding, CipherMode mode, int feedbackSizeInBits) 236CipherMode mode, 240Debug.Assert(mode == CipherMode.CFB ? feedbackSizeInBits == 8 : true); 252private UniversalCryptoTransform CreatePersistedCryptoTransformCore(Func<CngKey> cngKeyFactory, byte[]? iv, bool encrypting, PaddingMode padding, CipherMode mode, int feedbackSizeInBits) 257Debug.Assert(mode == CipherMode.CFB ? feedbackSizeInBits == 8 : true); 289private void ValidateFeedbackSize(CipherMode mode, int feedbackSizeInBits) 291if (mode != CipherMode.CFB) 298throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedbackSizeInBits, CipherMode.CFB)); 305throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedbackSizeInBits, CipherMode.CFB));
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.Windows.cs (2)
12CipherMode cipherMode, 28CipherMode cipherMode,
System\Security\Cryptography\Helpers.cs (5)
34public static bool UsesIv(this CipherMode cipherMode) 36return cipherMode != CipherMode.ECB; 39public static byte[]? GetCipherIv(this CipherMode cipherMode, byte[]? iv) 361public static int GetPaddingSize(this SymmetricAlgorithm algorithm, CipherMode mode, int feedbackSizeInBits) 363return (mode == CipherMode.CFB ? feedbackSizeInBits : algorithm.BlockSize) / 8;
System\Security\Cryptography\ICngSymmetricAlgorithm.cs (3)
19CipherMode Mode { get; } 30SafeAlgorithmHandle GetEphemeralModeHandle(CipherMode mode, int feedbackSizeInBits); 33int GetPaddingSize(CipherMode mode, int feedbackSizeBits);
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.Windows.cs (2)
12CipherMode cipherMode, 30CipherMode cipherMode,
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)) 1685protected CipherMode ModeValue;
System\Security\Cryptography\TripleDESCng.Windows.cs (8)
110CipherMode.ECB, 128CipherMode.ECB, 147CipherMode.CBC, 166CipherMode.CBC, 186CipherMode.CFB, 206CipherMode.CFB, 228int ICngSymmetricAlgorithm.GetPaddingSize(CipherMode mode, int feedbackSizeBits) 233SafeAlgorithmHandle ICngSymmetricAlgorithm.GetEphemeralModeHandle(CipherMode mode, int feedbackSizeInBits)
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.Windows.cs (2)
12CipherMode cipherMode, 28CipherMode cipherMode,
System.Security.Cryptography.Pkcs (1)
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (1)
206alg.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; 112_mode = CipherMode.CBC; 172public CipherMode Mode 700CipherMode origMode = symmetricAlgorithm.Mode; 720if (_mode == CipherMode.ECB) 754CipherMode origMode = symmetricAlgorithm.Mode; 760if (_mode != CipherMode.ECB)
System\Security\Cryptography\Xml\SymmetricKeyWrap.cs (2)
136aes.Mode = CipherMode.ECB; 199aes.Mode = CipherMode.ECB;