public static String SHA1(String text) {
        String Sha1 = "";
        String value = text.toUpperCase();
        try {
            MessageDigest md;
            md = MessageDigest.getInstance("SHA-1");
            byte[] sha1hash;
            md.update(value.getBytes("iso-8859-1"), 0, value.length());
            sha1hash = md.digest();
            Sha1 = convertToHex(sha1hash);
        } catch (NoSuchAlgorithmException ex) {
            writeToLog("Algoritme is onjuist: " + ex.getMessage());
        } catch (UnsupportedEncodingException ex) {
            writeToLog("Encoding is onjuist: " + ex.getMessage());
        }
        return Sha1;
    }