No description
Find a file
Akito13 c1aa625be5
Upgraded .nimble file
* corrected package name
* .nimble file follows new standard
* bumped version
* made sure that lib/ is actually included
2019-06-28 13:54:35 +02:00
lib Implement Nim wrapper 2014-12-07 14:46:31 -05:00
.gitignore Implement Nim wrapper 2014-12-07 14:46:31 -05:00
COPYING Add CC0 license to improve legal status 2014-02-07 18:16:33 +01:00
easy_bcrypt.nim Fix stray null byte 2015-01-11 18:57:51 -05:00
easy_bcrypt.nimble Upgraded .nimble file 2019-06-28 13:54:35 +02:00
README.md Update documentation 2015-01-11 17:56:49 -05:00

Brief Example

Hashing a password:

let passwordHash = hashPw(password, genSalt(12))

Verifying a password:

let savedHash = ...
assert hashPw(password, savedHash) == savedHash

Storing a password in a database:

let passwordString = $passwordHash
dbconn.exec("...", passwordString)

Loading a password from a database:

let password = dbconn.exec(
  "SELECT password FROM users WHERE username = ?;", username)
let passwordSalt = loadPasswordSalt(password)