private static ICryptoTransform CreateTransformCore( CipherMode cipherMode, PaddingMode paddingMode, byte[] key, byte[] iv, int blockSize, bool encrypting) { SafeAlgorithmHandle algorithm = GetCipherAlgorithm(cipherMode); BasicSymmetricCipher cipher = new CngCipher(algorithm, cipherMode, blockSize, key, iv, encrypting); return UniversalCryptoTransform.Create(paddingMode, cipher, encrypting); }
private static ICryptoTransform CreateTransformCore( CipherMode cipherMode, PaddingMode paddingMode, byte[] key, byte[] iv, int blockSize, bool encrypting) { SafeAlgorithmHandle algorithm = GetCipherAlgorithm(cipherMode); BasicSymmetricCipher cipher = new CngCipher(algorithm, cipherMode, blockSize, key, iv, encrypting); return(UniversalCryptoTransform.Create(paddingMode, cipher, encrypting)); }