diff --git a/README.md b/README.md index 614a404..835943b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # cox [![Build Status](https://travis-ci.org/didactic-drunk/cox.svg?branch=master)](https://travis-ci.org/didactic-drunk/cox) +[![Docs](https://img.shields.io/badge/docs-available-brightgreen.svg)](https://didactic-drunk.github.io/cox/) Updated Crystal bindings for the [libsodium API](https://libsodium.gitbook.io/doc/) diff --git a/src/cox/pwhash.cr b/src/cox/pwhash.cr index 50dece1..815284a 100644 --- a/src/cox/pwhash.cr +++ b/src/cox/pwhash.cr @@ -2,6 +2,8 @@ module Cox # [Argon2 Password Hashing](https://libsodium.gitbook.io/doc/password_hashing/the_argon2i_function) # * #store #verify #needs_rehash? are used together for password verification. # * #key_derive is used on it's own to generate password based keys. + # + # See `examples/pwhash_selector.cr` for help on selecting parameters. class Pwhash class PasswordVerifyError < Cox::Error end @@ -16,6 +18,7 @@ module Cox MEMLIMIT_MAX = LibSodium.crypto_pwhash_memlimit_max MEMLIMIT_INTERACTIVE = LibSodium.crypto_pwhash_memlimit_interactive + # Use the most recent algorithm Argon2id13 for new applications. enum Algorithm Argon2i13 = 1 Argon2id13 = 2