CmsAPI/Payment/wxpay/MD5SignUtil.cs
(完整代码) 1KBusing Cms.API.Payment.wxpay.comm;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Runtime.CompilerServices;
namespace Cms.API.Payment.wxpay
{
public class MD5SignUtil
{
public static String Sign(String content, String key)
{
String signStr = "";
if ("" == key)
{
throw new SDKRuntimeException("财付通签名key不能为空!");
}
if ("" == content)
{
throw new SDKRuntimeException("财付通签名内容不能为空");
}
signStr = content + "&key=" + key;
return MD5Util.MD5(signStr).ToUpper();
}
public static bool VerifySignature(String content, String sign,
String md5Key)
{
String signStr = content + "&key=" + md5Key;
String calculateSign = MD5Util.MD5(signStr).ToUpper();
String tenpaySign = sign.ToUpper();
return (calculateSign == tenpaySign);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
