Code example for NoSuchAlgorithmException

Methods: getMessage

0
            MessageDigest dgst = MessageDigest.getInstance("SHA-256");
            byte[] byteValue = dgst.digest(digestInput.getBytes());
            password = Base64.encode(byteValue);
            return password;
        } catch (NoSuchAlgorithmException e) {
            log.error(e.getMessage(), e);
            throw new UserStoreException(e.getMessage(), e);
        } 
    } 
 
    private void updateStringValuesToDatabase(Connection dbConnection, String sqlStmt,
                                              Object... params) throws UserStoreException {
        PreparedStatement prepStmt = null;
        boolean localConnection = false;
        try { 
            if (dbConnection == null) {
                localConnection = true;
                dbConnection = getDBConnection();
            } 
            prepStmt = dbConnection.prepareStatement(sqlStmt);
            if (params != null && params.length > 0) {