public String getTag(String compSHDataStr) {
        final String tagBase64Str;
        final byte[] tagBytes;
        final byte[] cipherTextBytes;
        final String HMACType = "HmacSHA256";

        // TODO clean correct/cleanup try/catch
        try {
            SecretKeySpec SKSHMACKey = new SecretKeySpec(HMACKey, HMACType);

            Mac tag = Mac.getInstance(HMACType);
            tag.init(SKSHMACKey);

            cipherTextBytes = compSHDataStr.getBytes(UTF8Charset);
            tagBytes = tag.doFinal(cipherTextBytes);
            
            tagBase64Str = DatatypeConverter.printBase64Binary(tagBytes);
            
            return tagBase64Str;
        
        } catch (NoSuchAlgorithmException e) {
            System.out.println("Error while creating tag: " + e);
            return null;
        } catch (InvalidKeyException e) {
            System.out.println("Bad pass phrase: " + e);
            return null;
        }
    }