Esempio n. 1
0
        public static Dictionary <string, string> WrapperParams(string key, string body)
        {
            string timestamp = GetTimeStamp().ToString();
            string nonce     = GetNonceString(8);
            String sign      = SignUtil.sign(key, timestamp, nonce, body);
            Dictionary <string, string> map = new Dictionary <string, string>();

            map.Add("body", body);
            map.Add("sign", sign);
            map.Add("timestamp", timestamp);
            map.Add("nonce", nonce);
            return(map);
        }
Esempio n. 2
0
        public static bool CheckSign(string key, string timestamp, string nonce, string body, string sign)
        {
            string checkSign = SignUtil.sign(key, timestamp, nonce, body);

            return(checkSign == sign);
        }