Пример #1
0
        public static byte[] DeriveKeyWithConfig(byte[] key, byte[] salt, int outputSize, byte[] config)
        {
            int iterations;

            PBKDF2ConfigurationUtility.Read(config, out iterations);
            var output = new byte[outputSize];

            Pbkdf2.ComputeKey(key, salt, iterations, Pbkdf2.CallbackFromHmac <HMACSHA256>(), outputSize, output);
            return(output);
        }
Пример #2
0
 public PBKDF2Module(int outputSize, byte[] config)
 {
     _outputSize = outputSize;
     PBKDF2ConfigurationUtility.Read(config, out _iterations);
 }