/saft-utils

SAF-T handling utilities

Primary LanguageJavaMIT LicenseMIT

SAF-T Utilities

Build Status Coverage Status Technical debt ratio Lines of Code Vulnerabilities Code Smells

Dev Tools

  • make test - runs the tests
  • make ci - runs the continuous integration suite
  • make uberjar - generates the standalone uberjar file

CLI

With the project jar you can run the utilities at the command line.

SAF-T Diff

The diff compares two SAF-T files and outputs its differences. It's meant for comparing different SAF-T generator implementations, and make sure that they are generating the same content.

java -jar saft-utilities.jar -op diff -file1 file1.xml -file2 file2.xml

Java Lib

You can use this lib programatically with Java. It requires Java8. You can use the SaftLoader class to load the SAF-T from a file (or String) into a AuditFile class. This class has all the SAF-T elements.

SAF-T Diff

With two AuditFiles ready, you can use SaftDiff to generate the differences between the SAF-Ts.

AuditFile f1 = SaftLoader.loadFromFile("file1.xml");
AuditFile f2 = SaftLoader.loadFromFile("file2.xml");

SaftDiff diff = new SaftDiff(f1, f2);
Result result = diff.process();

System.out.println(result);