Permalink
Browse files

Merge branch 'master' of github.com:ncb000gt/node.bcrypt.js

  • Loading branch information...
2 parents ec7d69d + 3d58e2d commit 2d30d5a7d6b19c155762630f0b16218989522210 @ncb000gt ncb000gt committed Jul 4, 2012
Showing with 7 additions and 6 deletions.
  1. +3 −3 examples/async_compare.js
  2. +4 −3 examples/forever_gen_salt.js
@@ -1,13 +1,13 @@
var bcrypt = require('../bcrypt');
var start = Date.now();
-bcrypt.gen_salt(10, function(err, salt) {
+bcrypt.genSalt(10, function(err, salt) {
console.log('salt: ' + salt);
console.log('salt cb end: ' + (Date.now() - start) + 'ms');
- bcrypt.encrypt('test', salt, function(err, crypted) {
+ bcrypt.hash('test', salt, function(err, crypted) {
console.log('crypted: ' + crypted);
console.log('crypted cb end: ' + (Date.now() - start) + 'ms');
- console.log('rounds used from hash:', bcrypt.get_rounds(crypted));
+ console.log('rounds used from hash:', bcrypt.getRounds(crypted));
bcrypt.compare('test', crypted, function(err, res) {
console.log('compared true: ' + res);
console.log('compared true cb end: ' + (Date.now() - start) + 'ms');
@@ -1,7 +1,8 @@
var bcrypt = require('../bcrypt');
-while (true) {
- bcrypt.gen_salt(10, function(err, salt) {
+(function printSalt() {
+ bcrypt.genSalt(10, function(err, salt) {
console.log('salt: ' + salt);
+ printSalt();
});
-}
+})()

0 comments on commit 2d30d5a

Please sign in to comment.