2021-06-11 18:31:10 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace SKIT.FlurlHttpClient.Wechat.Ads.UnitTests
|
|
|
|
|
{
|
|
|
|
|
public class WechatAdsSecurityTests
|
|
|
|
|
{
|
|
|
|
|
[Fact(DisplayName = "信息摘要(MD5)")]
|
|
|
|
|
public void Md5HashTest()
|
|
|
|
|
{
|
|
|
|
|
string rawData = "spidbff89d5138160943040012345678901234567890uFolxxiZbrZ/PRbyen5uK5D1kgIB2yHyDsfDGxxgeG";
|
|
|
|
|
|
2021-11-09 15:23:23 +08:00
|
|
|
|
string actualHash = Utilities.MD5Utility.Hash(rawData);
|
2021-10-18 17:31:57 +08:00
|
|
|
|
string expectedHash = "32c03e8fcdb08e653e42805e302f70ed";
|
2021-06-11 18:31:10 +08:00
|
|
|
|
|
2021-10-18 17:31:57 +08:00
|
|
|
|
Assert.Equal(expectedHash, actualHash, ignoreCase: true);
|
2021-06-11 18:31:10 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|