C# · 12月 20, 2021

C#:Md5和Sha1两种加密方式

1.新建控制台应用程序

2.新建类 EncryptHelper.cs

Md5( buffer = data = sb = ( t sb.Append(t.ToString( Sha1( buffer = data = sb = ( t sb.Append(t.ToString( }

3.修改 Program.cs 进行输出

Main( s = Console.WriteLine(+ Console.WriteLine(+ Console.WriteLine(+ Console.WriteLine( + Console.WriteLine( + }

4.效果图