private static string GenerateToken() { StringBuilder tokenBuilder = new StringBuilder(); long tokenid = SnowFlake_Net.GenerateSnowFlakeID(); tokenBuilder.Append(tokenid.ToString("x")); tokenBuilder.Append("@"); tokenBuilder.Append(RandomTool.CreatRandomString(16)); tokenBuilder.Append("@"); tokenBuilder.Append(DateTime.Now); var token = Base64Util.ToBase64String(tokenBuilder.ToString()); return(token); }
public void CreatRndNumTest() { String str = RandomTool.CreatRandomString(32); Console.WriteLine(str); }