WebApi开发框架增加Timestamp参数提升系统安全级别
WebApi开发框架增加Timestamp参数提升系统安全级别
ModelRequest模型更改:
ModelRequest模型更改:
数字签名验签(Verify Sign)更改:
C# Code:
/// <summary>
/// 验证文件请求
/// </summary>
/// <param name="request"></param>
public static void CheckSignature(IFileRequestAuth request)
{
string secret = ApiKeyProvider.GetSecretKey(request.ApiKey);
string sign = CryptoHelper.ToMD5(request.ApiKey + request.Bucket + secret + request.Timestamp);
//.....省略代码
}
//来源:C/S框架网(www.csframework.com) QQ:23404761
/// <summary>
/// 验证文件请求
/// </summary>
/// <param name="request"></param>
public static void CheckSignature(IFileRequestAuth request)
{
string secret = ApiKeyProvider.GetSecretKey(request.ApiKey);
string sign = CryptoHelper.ToMD5(request.ApiKey + request.Bucket + secret + request.Timestamp);
//.....省略代码
}
//来源:C/S框架网(www.csframework.com) QQ:23404761
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网