Example #1
0
        //验签入口
        public static bool checkSign(SortedDictionary <string, string> sParaTemp, String rsa_public, String md5_key)
        {
            if (sParaTemp == null)
            {
                return(false);
            }
            String sign_type;

            if (!sParaTemp.TryGetValue("sign_type", out sign_type))                //没指定签名方式
            {
                return(false);
            }
            if (SignTypeEnumClass.getCode(SignTypeEnum.MD5).Equals(sign_type))
            {
                return(checkSignMD5(sParaTemp, md5_key));
            }
            else
            {
                return(checkSignRSA(sParaTemp, rsa_public));
            }
        }