using System.Security.Cryptography;
public static void Main()
var password = "my password";
throw new ArgumentNullException("password");
using (Rfc2898DeriveBytes bytes = new Rfc2898DeriveBytes(password, 0x10, 0x3e8))
buffer2 = bytes.GetBytes(0x20);
byte[] dst = new byte[0x31];
Buffer.BlockCopy(salt, 0, dst, 1, 0x10);
Buffer.BlockCopy(buffer2, 0, dst, 0x11, 0x20);
Console.WriteLine(Convert.ToBase64String(dst));