Ejemplo n.º 1
0
 public static string AnalyseToken(this string original)
 {
     try
     {
         return(HashEncryptHepler.DecryptAESToString(original, _tokenPW, Encoding.UTF8.GetBytes(_tokenIV)));
     }
     catch
     {
         return(string.Empty);
     }
 }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;

            //var a = HashEncryptHepler.MD5Hash(HashEncryptHepler.MD5Hash("13321952950I4kl$0bs"));
            var b = Encoding.Default.GetString(Convert.FromBase64String("eVRkd3JodWpNWjJmemhNWmVkaVJKWjlBNk45RFZReWw="));
            //var a = HashEncryptHepler.EncryptAESToBase64("10000115", b, b.Substring(0, 16));
            var a = HashEncryptHepler.DecryptAESToString("m/ikMq4WOWlEqHUcj2XalA==", b, b.Substring(0, 16));
            //var c = HashEncryptHepler.DecryptAESToStringCore(b, ")O[xx]6,YF}+eecaj{+oESb7d8>Z'e9N", "UXS9rr9^1wUBzVu#");
            //var a = "cM067Ca06ivfYFjcJyUwHQjyhNydLioNn5tLbr7ac3uRTH0z/iP2wSdkICSxEgw3".AnalyseToken();
            //ListNode = new ThreadSafeObservableCollection<Node>();
            //ListNode.CollectionChanged += ListNode_CollectionChanged;
            //TestSql.Test();
            //ListType.WriteJson("appSettings.json");
        }
Ejemplo n.º 3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var nonce   = Utility.ObjectID;
            var curTime = DateTime.Now.ToLong().ToString();

            txt1.Text = nonce;
            txt2.Text = curTime;
            txt3.Text = HashEncryptHepler.SHA1Hash(txt0.Text + nonce + curTime).ToLower();

            var 啊  = HashEncryptHepler.EncryptAESToBase64("abcd1234qqqaaazzz222wwwssxx333", "_accessToken", "AqIm%czX6M20mi8w");
            var 啊1 = HashEncryptHepler.DecryptAESToString(啊, "qiK5jiZ7$rgBWVz1V*jJ!@ly7d2vxT9j", "AqIm%czX6M20mi8w");

            Trace.WriteLine(int.Parse("001231").ToString());
            //var a = Regex.Matches("asdasd1/9/2019 3:9:9 PM", RegexExtensions.DateTimePattern());
            //            var a = MsgServiceClient.GetUsers();
            //var b = MsgServiceClient.Send();
            //var c = MsgServiceClient.AddUserLog();
            //var d = MsgServiceClient.GetUser();
            //PushAndroidMsg(PushType.CustomizedCast, true, null, "", "测试测试", "测试内容", "", "12606278");
            //PushIosMsg(PushType.CustomizedCast,false,null,"","测试测试","测试内容","","d9e81235a11e4328a6d73ac104ff57d6");
            //PushMessage(PushType.BroadCast, "", "", "测试", "测试umeng广播", "测试umeng", "1");
            //var a = HAHA();
            //var b = HA();
        }