Skip to content

Commit 19d6267

Browse files
Add files via upload
1 parent d7c212a commit 19d6267

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

utils/SpeedEncryptTest.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Security.Cryptography;
3+
4+
public class Class1
5+
{
6+
public Class1()
7+
{
8+
}
9+
10+
public static void main()
11+
{
12+
var rng = new RNGCryptoServiceProvider();
13+
byte[] salt = new byte[16];
14+
salt = rng.GetBytes(salt);
15+
var watch = System.Diagnostics.Stopwatch.StartNew();
16+
var hasher = new Rfc2898DeriveBytes("HelloWorld12345", salt, 10000);
17+
watch.Stop();
18+
var elapsedMs = watch.ElapsedMilliseconds;
19+
Console.WriteLine(elapsedMs);
20+
21+
}
22+
}

0 commit comments

Comments
 (0)