File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,35 @@ public void FeasibilityTest()
3737 }
3838 }
3939
40+ /// <summary>
41+ /// 哈希算法64位压缩器测试
42+ /// </summary>
43+ [ TestMethod ]
44+ public void FeasibilityTest_WithCompress ( )
45+ {
46+ string [ ] testData = new string [ 12 ]
47+ {
48+ "SHVIOSJDifjDKljkJ$*F$W*938r5834r89we9fIOSFJOIS" , // 基础 ASCII 测试
49+ "SHVIOSJDifjDKljkJ$*F$W*939r5834r89we9fIOSFJOIS" , // 微变更测试 938 -> 939
50+ "DHSJKfkl5262fads43234LKgjsd#$%$%#$%fjLKSdkfJLD" , // 大变更测试
51+ "的是抗拒那就客服的撒滤镜打算离开房间啊w8e9832" , // 中文测试
52+ "的是抗拒那就客服的撒滤镜打算离开房间啊w8e9132" , // 中文微变更测试 9832 -> 9132
53+ "的dsa是fsd抗f拒s阿f斯是25是34会3卡死了的肌肤" , // 中文大变更测试
54+ "^$#%#$@T#@$@#$%#@^#$#@^#@%$&$#*$!*()$*@)($*)(#@" , // 纯符号测试
55+ "^$#%#$@T#@$@#$%#@^#$#@!#@%$&$#*$!*()$*@)($*)(#@" , // 纯符号微变更测试 ^ -> !
56+ "^$#%#*$(**(&#@(*$#*%(@$*(#@()#@09(()$*!)#(@*(#@" , // 纯符号大变更测试
57+ "🐦🐡🐣🐱💣" , // Emoji(Unicode) 测试
58+ "🐦🐡💯🐱💣" , // Emoji(Unicode) 小变更测试 🐣 -> 💯
59+ "💬💰💮🕷🚩" // Emoji(Unicode) 大变更测试
60+ } ;
61+ for ( int i = 0 ; i < testData . Length ; ++ i )
62+ {
63+ Console . WriteLine ( testData [ i ] ) ;
64+ Console . WriteLine ( Hash . FromString_ToHex_WithoutCompress ( testData [ i ] ) ) ;
65+ Console . WriteLine ( Hash . FromString_ToHex ( testData [ i ] , false ) ) ;
66+ }
67+ }
68+
4069 /// <summary>
4170 /// 短长度字符串Hash测试
4271 /// </summary>
You can’t perform that action at this time.
0 commit comments