Exemple #1
0
        private static string Encrypt(string plainText, string encryptionKey, string salt)
        {
            if (string.IsNullOrEmpty(plainText))
            {
                return(null);
            }
            if (string.IsNullOrEmpty(encryptionKey))
            {
                throw new ArgumentNullException(nameof(encryptionKey));
            }
            if (string.IsNullOrEmpty(salt))
            {
                throw new ArgumentNullException(nameof(salt));
            }

            return(RijndaelSimple.SHA1Encrypt(plainText, encryptionKey, salt, IV));
        }