PassCryptRaw.scrypt constructor

PassCryptRaw.scrypt({
  1. int cpu = 16384,
  2. int mem = 16,
  3. int par = 1,
})

Initialize a Scrypt-based PassCrypt().

cpu is the cpu difficulty. This is the security vs. time tradeoff: increasing increases both time and security. This must be a power of two. If you want to speed up hashing/increase security, decrease/ increase this parameter.

mem is the memory difficulty. This should not be changed unless you have a specific reason for doing so (memory constraints). The lowest recommended value is 8.

par is the parallel difficulty. Higher values for p compute more hashes in the same time, but should only be used if you're cpu-restricted and can't up the cpu difficulty any further.

Implementation

PassCryptRaw.scrypt({int cpu = 16384, int mem = 16, int par = 1})
    : _algorithm = 0,
      _params = {'N': cpu, 'r': mem, 'p': par};