Skip to content

plackemacher/secure_compare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecureCompare for Elixir

hex.pm version Build Status

A simple constant-time comparison algorithm for Elixir based on the Devise.secure_compare method found here.

Installation

The package can be installed by adding secure_compare to your list of dependencies in mix.exs:

def deps do
  [{:secure_compare, "~> 0.1.0"}]
end

Usage

a = "123"
b = "456"

SecureCompare.compare(a, b) # => false