Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SWID Tag Generator (example 01)
// prepare SWID Tag processor
SwidProcessor processor = new DefaultSwidProcessor();
((DefaultSwidProcessor) processor).setEntitlementRequiredIndicator(true)
.setProductVersion("2.1.0", 2, 1, 0, 0)
.setSoftwareCreator("Labs64", "")
.setSoftwareLicensor("Labs64", "")
.setSoftwareId("NLIC", "")
.setTagCreator("Labs64", "");
// create builder and pass processor as build param
SwidBuilder builder = new SwidBuilder();
SoftwareIdentificationTagComplexType swidTag =;
// output resulting object
SwidWriter writer = new SwidWriter();
StringWriter out = new StringWriter();
writer.write(swidTag, out);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.