Пример #1
0
        private static string SHA5Encrypt(string phrase)
        {
            UTF8Encoding uTF8Encoding = new UTF8Encoding();

            byte[] numArray = (new SHA256Managed()).ComputeHash(uTF8Encoding.GetBytes(phrase));
            return(MyLogin.byteArrayToString(numArray));
        }
Пример #2
0
        private static string SHA1Encrypt(string phrase)
        {
            UTF8Encoding uTF8Encoding = new UTF8Encoding();

            byte[] numArray = (new SHA1CryptoServiceProvider()).ComputeHash(uTF8Encoding.GetBytes(phrase));
            return(MyLogin.byteArrayToString(numArray));
        }