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
Exemplo n.º 1
0
 public MasterKey(string secretPassword, byte[] salt, int iterations, Pbkdf2 pbkdf2)
 {
     Salt = salt;
     SecretKey = pbkdf2.Compute(secretPassword, Salt, iterations);
     Iterations = iterations;
 }
Exemplo n.º 2
0
 public Encryptor(Pbkdf2 pbkdf2, Aes aes)
 {
     _pbkdf2 = pbkdf2;
     _aes = aes;
 }
Exemplo n.º 3
0
 public MasterKey(string secretPassword, int iterations, Pbkdf2 pbkdf2)
     : this(secretPassword, pbkdf2.GenerateSalt(), iterations, pbkdf2)
 {
 }