using System; using System.Text; using System.Security.Cryptography; namespace Sog.Crypto { /// /// 游客账号加密模块 /// public static class GuestAccountCrypto { public static string GetAccountToken(string accountId) { SHA1 sha1 = new SHA1CryptoServiceProvider(); byte[] dataIn = System.Text.Encoding.UTF8.GetBytes(accountId + "-xGame"); byte[] dataOut = sha1.ComputeHash(dataIn); string str = BitConverter.ToString(dataOut); return str.Replace("-", ""); } } }