Jan Dvorak <[email protected]>
Colin Percival’s SCrypt library bindings. Provides the scrypt function for secure password derivation.
|(require libscrypt)||package: libscrypt|
password : (or/c string? bytes?) salt : (or/c string? bytes?) N : exact-positive-integer? = 14 r : exact-positive-integer? = 8 p : exact-positive-integer? = 1 size : exact-positive-integer? = 32
It should be sufficient to call it with default options, specifying the output size only:
> (time (bytes->hex-string (scrypt "secret" "salt" #:size 8)))
cpu time: 51 real time: 51 gc time: 0
If you need to tune the difficulty, for example to use more memory, you can do so. The overall difficulty N is given as exponent, r is the memory cost and p parallelisation.