View Source jargon (jargon v1.0.0)

Summary

Functions

Verify an encoded hash against a password.

Functions

Link to this function

hash(Password, Salt, Algorithm, TimeCost, MemoryCost, Parallelism, HashLen)

View Source
-spec hash(Password :: binary(),
     Salt :: binary(),
     Algorithm :: argon2d | argon2i | argon2id,
     TimeCost :: pos_integer(),
     MemoryCost :: pos_integer(),
     Parallelism :: pos_integer(),
     HashLen :: pos_integer()) ->
        {ok, RawHash :: binary(), EncodedHash :: binary()} | {error, Error :: atom()}.
Hash a password with Argon2.
Link to this function

verify(EncodedHash, Password)

View Source
-spec verify(EncodedHash :: binary(), Password :: binary()) ->
          {ok, true} | {ok, false} | {error, Error :: atom()}.
Verify an encoded hash against a password.