Esempio n. 1
0
 public static void ComputeKey(byte[] key, byte[] salt,
                               int cost, int blockSize, int parallel, int?maxThreads, byte[] output)
 {
     using (Pbkdf2 kdf = GetStream(key, salt, cost, blockSize, parallel, maxThreads))
     {
         kdf.Read(output);
     }
 }
Esempio n. 2
0
 public static void ComputeKey(byte[] key, byte[] salt, int iterations,
                               ComputeHmacCallback computeHmacCallback, int hmacLength, byte[] output)
 {
     using (Pbkdf2 kdf = new Pbkdf2(key, salt, iterations, computeHmacCallback, hmacLength))
     {
         kdf.Read(output);
     }
 }