static compareHashes(hash, clearPassword) {
    return new Promise((resolve, reject) => {
      bcrypt.compare(clearPassword, hash, (error, match) => {
        if (match)
          resolve()
        reject()
      });
    });
  }
/**
    * Compare between a password and a hash password from database.
    * @param {String} hash the hash password from database
    * @param {String} clearPassword the user's password
    * @returns {Promise}
    */
Compare between a password and a hash password from database.
@param {String} hash the hash password from database
@param {String} clearPassword the user's password
@returns {Promise}
Compare between a password and a hash password from database . @param { String } hash the hash password from database @param { String } clearPassword the user ' s password @returns { Promise }
static compareHashes(hash, clearPassword) {
    return new Promise((resolve, reject) => {
      bcrypt.compare(clearPassword, hash, (error, match) => {
        if (match)
          resolve()
        reject()
      });
    });
  }
static compareHashes ( hash , clearPassword ) { return new Promise ( ( resolve , reject ) => { bcrypt . compare ( clearPassword , hash , ( error , match ) => { if ( match ) resolve ( ) reject ( ) } ) ; } ) ; }
Compare between a password and a hash password from database.
Compare between a password and a hash password from database .