cryptoPWHash :: Ptr CUCharoutparameter. It represents the address of a dedicated storage area ofoutlenbytes.-> CLLongoutlenparameter. It is the length of the key derived from thepasswdparameter. This should be a least cryptoPWHashBytesMin and at most cryptoPWHashBytesMax.-> Ptr CCharpasswdparameter. It is a pointer to the password that is to be derived.-> CULLongpasswdlenparameter. It is the size of the password.-> Ptr CUCharsaltparameter. It is of a fixed length established by cryptoPWHashSaltBytes. It should be unpredictable. randombytesBuf is the best way to fill the cryptoPWHashSaltBytes of the salt.-> CULLongopslimitparameter. It represents the maximum amount of computations to perform. Raising this number will make the function require more CPU cycles to compute a key. This number must be between cryptoPWHashOpsLimitMin and cryptoPWHashOpsLimitMax.-> CSizememlimitparameter. It is the maximum amount of RAM in bytes that the function will use. This number must be between cryptoPWHashMemLimitMin cryptoPWHashMemLimitMax-> CIntalgparameter. It is an identifier for the algorithm to use and should be set to one of the following values: cryptoPWHashAlgDefault, cryptoPWHashAlgArgon2I13 or cryptoPWHashAlgArgon2ID13.-> IO CIntThe return code is 0 on success and -1 if the computation didn't complete, usually because the operating system refused to allocate the amount of requested memory.
This functions derives a key from a password. The computed key is then stored in the out parameter.
See: crypto_pwhash()