Permalink
Browse files

Make README more consistent with Crypt::Argon2

  • Loading branch information...
skinkade committed Apr 24, 2016
1 parent f333b99 commit cf1bbcecde17eb1b9cc5751c4e872c3894e7d6d2
Showing with 19 additions and 10 deletions.
  1. +1 −1 .gitignore
  2. +16 −7 README.md
  3. +2 −2 lib/Crypt/Bcrypt.pm6
View
@@ -2,4 +2,4 @@
*.o
blib/
Makefile
.precomp
View
@@ -1,16 +1,25 @@
# Crypt::Bcrypt #
Bcrypt password hashing in Perl6.
[![Build Status](https://travis-ci.org/skinkade/p6-Crypt-Bcrypt.svg?branch=master)](https://travis-ci.org/skinkade/p6-Crypt-Bcrypt)
Easy `bcrypt` password hashing in Perl6.
## Synopsis ##
Password hashing and verification are one function each, and utilze a
crypt()-style output string:
```
use Crypt::Bcrypt;
> use Crypt::Bcrypt;
> my $hash = bcrypt-hash("password")
$2b$12$EFUDTFQAf/6YwmnN/FKyX.kH0BsE/YNExuIQcI1WZXO/rwkmD8G2S
> bcrypt-match("password", $hash)
True
# 2^12 rounds by default
my $hash = bcrypt-hash("password");
my $hard-hash = bcrypt-hash("password", :rounds(15));
> bcrypt-match("wrong", $hash)
False
bcrypt-match("password", $hash); # True
bcrypt-match("password1", $hash); # False
> bcrypt-hash("password", :rounds(15))
$2b$15$BcxIqbIcb1bDt3SHkEjO/ePcdeNV8f2xeFSQTyoiidYGUA03lptrm
```
## Windows ##
View
@@ -39,12 +39,12 @@ sub library returns Str {
sub crypt(Str $key is encoded('utf8'), Str $setting is encoded('utf8'))
is native(&library)
returns Str
{ ... }
{ * }
sub crypt_gensalt(Str $prefix is encoded('utf8'), uint32 $count, Buf $input, size_t $size)
is native(&library)
returns Str
{ ... }
{ * }
sub gensalt(int $rounds where 4..31) returns Str {
crypt_gensalt('$2b$', $rounds, crypt_random_buf(16), 128);

0 comments on commit cf1bbce

Please sign in to comment.