SecretsWatcher.Compare (Secrets Watcher v0.3.0) View Source

This module provides a function to compare secrets in constant time to avoid timing attacks.

Link to this section Summary

Functions

Compares lhs and rhs binaries in constant time.

Link to this section Functions

Compares lhs and rhs binaries in constant time.

Examples

iex> equal?("abc", "abc")
true

iex> equal?("abc", "abcd")
false