Skip to content

ysbaddaden/scrypt-crystal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrypt (crystal)

Crystal bindings for Colin Percival's scrypt library.

The scrypt key derivation function was originally developed for use in the Tarsnap online backup system and is designed to be far more secure against hardware brute-force attacks than alternative functions such as PBKDF2 or bcrypt.

Install

Using Shards, add the scrypt dependency to your shard.yml then run shards install.

dependencies:
  scrypt:
    github: ysbaddaden/scrypt-crystal

If you're not using Shards, you may clone the repository then run make lib to download and compile the libscrypt.a library.

Usage

require "scrypt"

# hash
hashed_password = Scrypt::Password.create("super awesome")

# compare
hashed_password == "super awesome"  # => true
hashed_password == "super wrong"    # => false

Authors

License

Distributed under the BSD 2-Clause license.

About

Crystal bindings for Colin Percival's scrypt key derivation function

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published