C# 哈希加密字符串

    ///


        /// 哈希加密一个字符串
        ///

        ///
        ///
        public static string HashEncoding(string Security)
        {                        
            byte[] Value;
            UnicodeEncoding Code = new UnicodeEncoding();
            byte[] Message = Code.GetBytes(Security);
            SHA512Managed Arithmetic = new SHA512Managed();
            Value = Arithmetic.ComputeHash(Message);
            Security = "";
            foreach(byte o in Value)
            {
                Security += (int) o + "O";
            }
            return Security;
        }

你可能感兴趣的:(C#,加解密)