Skip to content

Commit

Permalink
update README.md and fix doc/demo.html
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Jan 13, 2014
1 parent 6f2902a commit f3a04f2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@ sha512crypt implementation for node

This implements the sha512crypt algorithm as described in
http://www.akkadia.org/drepper/SHA-crypt.txt
in pure javascript.
in pure javascript.

Basic usage:
Its available in npm via:
```
$ npm install sha512crypt-node
```

A example how to use it in a html page is provided in doc/demo.html:
```
var hash = sha512crypt(document.forms["pwform"]["password"].value,
document.forms["pwform"]["salt"].value);
```


Basic commandline usage:
```
$ ./demo.js pass salt
$6$salt$3aEJgflnzWuw1O3tr0IYSmhUY0cZ7iBQeBP392T7RXjLP3TKKu3ddIapQaCpbD4p9ioeGaVIjOHaym7HvCuUm0
Expand All @@ -14,11 +26,6 @@ $ python -c 'import crypt; crypt.crypt("pass", "$6$salt")
$6$salt$3aEJgflnzWuw1O3tr0IYSmhUY0cZ7iBQeBP392T7RXjLP3TKKu3ddIapQaCpbD4p9ioeGaVIjOHaym7HvCuUm0
```

A example how to use it in a html page is provided in:
```
doc/demo.html
```


Using the "rounds" parameter as part of the salt:
```
Expand Down
1 change: 1 addition & 0 deletions doc/sha512.js
1 change: 1 addition & 0 deletions doc/sha512crypt.js

0 comments on commit f3a04f2

Please sign in to comment.