44 if (nCryptAlgorithmIdentifier != algorithm.
Algorithm)
48 _outer.BaseKeySize = cngKey.KeySize;
69 outer.BaseKeySize = keySize;
130 byte[]
array = rgbKey.CloneByteArray();
131 long num = (long)
array.Length * 8
L;
140 if (rgbIV !=
null && rgbIV.Length !=
_outer.
BlockSize.BitSizeToByteSize())
144 byte[] iv = mode.GetCipherIv(rgbIV).CloneByteArray();
183 else if (feedbackSizeInBits != 8)
static byte[] GenerateRandom(int count)
static string Cryptography_WeakKey
static string Format(string resourceFormat, object p1)
static string Cryptography_CipherModeFeedbackNotSupported
static string Cryptography_CngKeyWrongAlgorithm
static string Cryptography_InvalidKeySize
static string Cryptography_InvalidIVSize
static CngKey Open(string keyName)
string GetNCryptAlgorithmIdentifier()
int GetPaddingSize(CipherMode mode, int feedbackSizeBits)
bool IsWeakKey(byte[] key)
Internal.NativeCrypto.SafeAlgorithmHandle GetEphemeralModeHandle(CipherMode mode, int feedbackSizeInBits)
byte[] PreprocessKey(byte[] key)
bool IsValidEphemeralFeedbackSize(int feedbackSizeInBits)
byte[] GetKeyIfExportable()
ICryptoTransform CreateEncryptor()
ICryptoTransform CreateCryptoTransform(bool encrypting)
void ValidateFeedbackSize(CipherMode mode, int feedbackSizeInBits)
ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
ICryptoTransform CreateDecryptor()
readonly CngKeyOpenOptions _optionOptions
void SetKeySize(int keySize, ICngSymmetricAlgorithm outer)
readonly ICngSymmetricAlgorithm _outer
readonly CngProvider _provider
Internal.Cryptography.UniversalCryptoTransform CreateEphemeralCryptoTransformCore(byte[] key, byte[] iv, bool encrypting, PaddingMode padding, CipherMode mode, int feedbackSizeInBits)
Internal.Cryptography.UniversalCryptoTransform CreateCryptoTransform(byte[] rgbKey, byte[] rgbIV, bool encrypting, PaddingMode padding, CipherMode mode, int feedbackSizeInBits)
CngSymmetricAlgorithmCore(ICngSymmetricAlgorithm outer)
Internal.Cryptography.UniversalCryptoTransform CreatePersistedCryptoTransformCore(Func< CngKey > cngKeyFactory, byte[] iv, bool encrypting, PaddingMode padding, CipherMode mode, int feedbackSizeInBits)
Internal.Cryptography.UniversalCryptoTransform CreateCryptoTransform(byte[] iv, bool encrypting, PaddingMode padding, CipherMode mode, int feedbackSizeInBits)
CngSymmetricAlgorithmCore(ICngSymmetricAlgorithm outer, string keyName, CngProvider provider, CngKeyOpenOptions openOptions)
ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)