Comeonin.Tools
Module that provides various tools for the hashing algorithms.
Summary↑
decode64(data) | Decode using an adapted base64 alphabet (using |
encode64(data) | Encode using an adapted base64 alphabet (using |
secure_check(hash, stored) | Compares the two binaries in constant time to avoid timing attacks |
Functions
Decode using an adapted base64 alphabet (using .
instead of +
and with no padding).
Examples
iex> Comeonin.Tools.decode64("c3BhbWFuZGVnZ3M")
"spamandeggs"
Encode using an adapted base64 alphabet (using .
instead of +
and with no padding).
Examples
iex> Comeonin.Tools.encode64 "spamandeggs"
"c3BhbWFuZGVnZ3M"
Compares the two binaries in constant time to avoid timing attacks.