Generating the Encrypted SAF-T File and SHA-256 Hash
Run the SAFT Encryption and Hash Generation program (R74L3004) after generating the SAF-T XML file using the SAFT Extractor program (R74L3001).
The system converts the SAF-T XML to canonical form, generates a SHA-256 hash for the unencrypted canonical XML, and encrypts the sensitive XML elements using AES-128 encryption in Counter (CTR) mode.
On successful completion, the report displays the SHA-256 hash and confirms that the SAF-T file was encrypted. The program generates an encrypted SAF-T XML file and a separate text file containing the SHA-256 hash.
Note: After processing, the output folder contains two files: the encrypted SAF-T XML file
and the hash text file. The process does not retain the original XML file and the
intermediate canonical file.
The following diagram illustrates the process flow for SAF-T encryption and hash generation: