Comeonin.Tools

Module that provides various tools for the hashing algorithms.

Source

Summary

decode64(data)

Decode using an adapted base64 alphabet (using . instead of + and with no padding

encode64(data)

Encode using an adapted base64 alphabet (using . instead of + and with no padding

secure_check(hash, stored)

Compares the two binaries in constant time to avoid timing attacks

Functions

decode64(data)

Decode using an adapted base64 alphabet (using . instead of + and with no padding.

Examples

iex> Comeonin.Tools.decode64("c3BhbWFuZGVnZ3M")
"spamandeggs"
Source
encode64(data)

Encode using an adapted base64 alphabet (using . instead of + and with no padding.

Examples

iex> Comeonin.Tools.encode64 "spamandeggs"
"c3BhbWFuZGVnZ3M"
Source
secure_check(hash, stored)

Compares the two binaries in constant time to avoid timing attacks.

Source