mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 18:04:42 +08:00
chore: upgrade dependencies
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests
|
||||
{
|
||||
public class TestCase_ToolsSM3UtilityTests
|
||||
{
|
||||
[Fact(DisplayName = "测试用例:计算 SM3 哈希值")]
|
||||
public void TestSM3Hash()
|
||||
{
|
||||
byte[] msgBytes = Convert.FromBase64String("QXdlc29tZSBTS0lULkZsdXJsSHR0cENsaWVudC5XZWNoYXQuVGVucGF5QnVzaW5lc3Mh");
|
||||
string expectedHashText = "A7A58FCEDDDEE4BD2E05887E5F4D8B7D662357BE474F3821CA858EE1CFFB4B83";
|
||||
string actualHashText = BitConverter.ToString(Utilities.SM3Utility.Hash(msgBytes)).Replace("-", "");
|
||||
|
||||
Assert.Equal(actualHashText, expectedHashText, ignoreCase: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user