19
1
using System;
2
using System.Text;
3
using System.Security.Cryptography;
4
5
6
public class Program
7
{
8
public static void Main()
9
{
10
byte[] bytes = Encoding.UTF8.GetBytes("salt salt salt");
11
Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes("some password", bytes);
12
rfc2898DeriveBytes.IterationCount = 1000;
13
for (var i = 0; i < 10; i++) {
14
var a = rfc2898DeriveBytes.GetBytes(16);
15
Console.WriteLine("Encoded string: " + BitConverter.ToString(a));
16
}
17
18
}
19
}
Cached Result