예제 #1
0
        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);
        }
예제 #2
0
        public void CreatRndNumTest()
        {
            String str = RandomTool.CreatRandomString(32);

            Console.WriteLine(str);
        }