RFC2898 Implements password-based key derivation function 2, PBKDF2, by using pseudo-random number generator based on HMACSHA1, hash-based (SHA-1) message authentication code
예제 #1
0
 public MasterKey(string secretPassword, byte[] salt, int iterations, Pbkdf2 pbkdf2)
 {
     Salt = salt;
     SecretKey = pbkdf2.Compute(secretPassword, Salt, iterations);
     Iterations = iterations;
 }
예제 #2
0
 public Encryptor(Pbkdf2 pbkdf2, Aes aes)
 {
     _pbkdf2 = pbkdf2;
     _aes = aes;
 }
예제 #3
0
 public MasterKey(string secretPassword, int iterations, Pbkdf2 pbkdf2)
     : this(secretPassword, pbkdf2.GenerateSalt(), iterations, pbkdf2)
 {
 }