title: No callback error shown when using bcrypt-node
body: <p>I am have created a node library file called <code>encrypt.js</code>. </p>
  
  <p>Within that are some functions created using bcrypt-nodejs</p>
  
  <pre><code>var bcrypt = require('bcrypt-nodejs');
  
  exports.cryptPassword = function(password, callback) {
      bcrypt.genSalt(10, function(err, salt) {
          if (err) return callback(err);
          else {
              bcrypt.hash(password, salt, function(err, hash) {
                  return callback(err, hash);
              });
          }
      });
  };
  
  exports.comparePassword = function(password, userPassword, callback) {
      bcrypt.compare(password, userPassword, function(err, isPasswordMatch) {
          if (err) return callback(err);
          else return callback(null, isPasswordMatch);
      });
  };
  </code></pre>
  
  <p>When I now use <code>cryptPassword</code> from my <code>server.js</code> file it shows an error coming from the <code>bcrypt-nodejs</code> library stating '<code>no callback function was given</code>'</p>
  
  <p>I have added a function within my call as below</p>
  
  <pre><code>var encryptedPassword =  encrypt.cryptPassword(req.body.user.password, function (err, salt){
      if(err) {throw err};
      console.log('hlllll');
  });
  </code></pre>
  
  <p>Can anyone help? </p>