byte[] pwdhash = md.digest(password.getBytes());
byte[] pwdhash = md.digest(password.trim().getBytes());
    private String makePasswordHash(String password) throws NoSuchAlgorithmException {        if (password == null)            return null;        try {            MessageDigest md = MessageDigest.getInstance("SHA1");            byte[] pwdhash = md.digest(password.getBytes());            return Hex.encode(pwdhash);        } catch (NoSuchAlgorithmException nsae) {            cat.error("SHA1 algorithm not supported.", nsae);            throw nsae;        }    }