val scrypt_kdf : password:Cstruct.t -> salt:Cstruct.t -> n:int -> r:int -> p:int -> dk_len:int32 -> Cstruct.t
scrypt_kdf password salt n r p dk_len
is dk
, the derived key of dk_len
octets. n
, the cost parameter, must be larger than 1 and a power of 2. p
, the parallelization parameter, must be a possitive integer and less than or equal to 2^32 - 1 / (4 * r)
- raises Invalid_argument
when either
n
,p
ordk_len
are not valid