src/com/vehiclerental/logicLayer/implementations/UserServiceImpl.java
/**
     * Checks the validity of a couple of user credentials
     *
     * @param user The user object
     * @param password The plain text password
     * @return true if valid, false otherwise
     */
Checks the validity of a couple of user credentials
@param user The user object
@param password The plain text password
@return true if valid, false otherwise
Checks the validity of a couple of user credentials @param user The user object @param password The plain text password @return true if valid false otherwise
@Override
    public boolean isUserAccountValid(User user, String password) {
        try {
            return CryptoUtils.AreHashAndClearValueEqual(user.getHashedPassword(), password);
        } catch (UnsupportedEncodingException e) {
            return false;
        } catch (NoSuchAlgorithmException e) {
            return false;
        }
    }
@ Override public boolean isUserAccountValid ( User user , String password ) { try { return CryptoUtils . AreHashAndClearValueEqual ( user . getHashedPassword ( ) , password ) ; } catch ( UnsupportedEncodingException e ) { return false ; } catch ( NoSuchAlgorithmException e ) { return false ; } }
Checks the validity of a couple of user credentials
 @param user The user object
 @param password The plain text password
 @return true if valid, false otherwise
Checks the validity of a couple of user credentials @param user The user object @param password The plain text password @return true if valid false otherwise