pbkdf2 (pbkdf2 v2.2.1)

Link to this section Summary

Link to this section Types

Link to this type

digest_func_info/0

Specs

digest_func_info() :: md4 | md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512.

Specs

hex_char() :: 48..57 | 97..102.

Specs

hex_list() :: [hex_char()].
Link to this type

mac_func_info/0

Specs

mac_func_info() :: {hmac, digest_func_info()} | digest_func_info().

Link to this section Functions

Link to this function

compare_secure(First, Second)

Specs

compare_secure(First, Second) -> boolean()
                  when First :: binary() | string(), Second :: binary() | string().
Link to this function

pbkdf2(MacFunc, Password, Salt, Iterations)

Specs

pbkdf2(MacFunc, Password, Salt, Iterations) -> {ok, Key}
          when
              MacFunc :: mac_func_info(),
              Password :: binary(),
              Salt :: binary(),
              Iterations :: integer(),
              Key :: binary().
Link to this function

pbkdf2(MacFunc, Password, Salt, Iterations, DerivedLength)

Specs

pbkdf2(MacFunc, Password, Salt, Iterations, DerivedLength) ->
          {ok, Key} | {error, derived_key_too_long}
          when
              MacFunc :: mac_func_info(),
              Password :: binary(),
              Salt :: binary(),
              Iterations :: integer(),
              DerivedLength :: integer(),
              Key :: binary().

Specs

to_hex(Data) -> HexData when Data :: binary() | list(), HexData :: binary() | hex_list().