@Override
  public byte[] computeMac(byte[] data) throws GeneralSecurityException {
    byte[] data2 = data;
    if (outputPrefixType.equals(OutputPrefixType.LEGACY)) {
      data2 = Bytes.concat(data, FORMAT_VERSION);
    }
    return Bytes.concat(identifier, rawMac.computeMac(data2));
  }
This method covers the cases where users created their own mac/key classes.
java_src/src/main/java/com/google/crypto/tink/mac/internal/LegacyFullMac.java