예제 #1
0
        public static byte[] DeriveKeyWithConfig(byte[] key, byte[] salt, int outputSize, byte[] config)
        {
            int iterationPower, blocks, parallelisation;

            ScryptConfigurationUtility.Read(config, out iterationPower, out blocks, out parallelisation);
            var output = new byte[outputSize];

            SCrypt.ComputeKey(key, salt, iterationPower, blocks, parallelisation, null, output);
            return(output);
        }
예제 #2
0
 public ScryptModule(int outputSize, byte[] config)
 {
     _outputSize = outputSize;
     ScryptConfigurationUtility.Read(config, out _iterationPower, out _blocks, out _parallelisation);
 }