View Source fast_pbkdf2 (fast_pbkdf2 v2.0.0)

Summary

Functions

This function calculates the pbkdf2 algorithm where dkLen is simply assumed to be that of the underlying hash function, a sane default.

This function allows to customise the desired dkLen parameter for pbkdf2.

Types

sha3/0

-type sha3() :: sha3_224 | sha3_256 | sha3_384 | sha3_512.

sha_type/0

-type sha_type() :: crypto:sha1() | crypto:sha2() | sha3().

Functions

pbkdf2(Hash, Password, Salt, IterationCount)

-spec pbkdf2(sha_type(), binary(), binary(), non_neg_integer()) -> binary() | {error, atom()}.

This function calculates the pbkdf2 algorithm where dkLen is simply assumed to be that of the underlying hash function, a sane default.

pbkdf2(Hash, Password, Salt, IterationCount, DkLen)

-spec pbkdf2(sha_type(), binary(), binary(), non_neg_integer(), non_neg_integer()) ->
                binary() | {error, atom()}.

This function allows to customise the desired dkLen parameter for pbkdf2.