/** * Describe <code>digestAuth</code> method here. * * @param user a <code>String</code> value * @param digest a <code>String</code> value * @param id a <code>String</code> value * @param alg a <code>String</code> value * @return a <code>boolean</code> value * @exception UserNotFoundException if an error occurs * @exception TigaseDBException if an error occurs * @exception AuthorizationException if an error occurs */ @Override @Deprecated public boolean digestAuth(BareJID user, final String digest, final String id, final String alg) throws UserNotFoundException, TigaseDBException, AuthorizationException { final String db_password = getPassword(user); try { final String digest_db_pass = Algorithms.hexDigest(id, db_password, alg); if (log.isLoggable(Level.FINEST)) { log.finest("Comparing passwords, given: " + digest + ", db: " + digest_db_pass); } return digest.equals(digest_db_pass); } catch (NoSuchAlgorithmException e) { throw new AuthorizationException("No such algorithm.", e); } // end of try-catch }