More documentation.
parent
b07de55a28
commit
da8f97ae47
|
@ -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/)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue