No description
Find a file
2018-10-14 02:05:57 +00:00
bcrypt dir for c stuff 2018-10-14 01:59:00 +00:00
.gitignore dir for c stuff 2018-10-14 02:05:57 +00:00
bcrypt.nim dir for c stuff 2018-10-14 02:05:57 +00:00
bcrypt.nimble test 2018-10-09 22:58:49 +00:00
README.md Update README.md 2014-03-11 21:31:15 -07:00

bcrypt

This is a Nimrod wrapper for the bcrypt C functions. It also includes some BSD code for arc4random.
Since these are FreeBSD/OpenBSD code files, the license is BSD, or as stated at the top of the source files. "This product includes software developed by Niels Provos."

bcrypt is useful for hashing passwords.

Usage example:

import bcrypt, os

var salt = ""

if existsFile("salt"):
  salt = readFile("salt")
else:
  salt = genSalt(10)
  writeFile("salt", salt)

echo("salt is " & salt)

echo("Hashed password: ", hash("myPaSword2",salt))