Esempio n. 1
0
        /// <summary>
        /// 验签
        /// </summary>
        /// <returns>是否为真实值</returns>
        private bool Verify()
        {
            StringBuilder sb   = new StringBuilder();
            string        sign = "";
            bool          b    = false;

            foreach (var(k, v) in jo)
            {
                if (k.Equals("sign"))
                {
                    sign = v.ToString();
                    continue;
                }
                if (b)
                {
                    sb.Append("&");
                }
                sb.Append($"{k}={v}");
                b = true;
            }
            return(RSA.AllinpayVerify(sb.ToString(), sign));
        }