This project contains 4 python scripts.
The first script generates a hash with SHA512 algorithm of a directory where there are .tic files.
The second script uses a private key generated by AFIP, it uses the PKCS1_v1_5 protocol to sign the hashes generated with the previous script.
And finally, there are 2 verification scripts to verify the signature created against the .tic file and against the hash.
pip install -r requirements.txt
- origin folder
- destination folder
python script-hash.py "C:\\folder_ori" "C:\\folder_dest"
- origin folder
- private key
python script-sign.py "C:\\folder_ori" "C:\\KEYS\\clavePribHomologacion.key"
- hash file
- signature file
python script-verification.py "C:\\hash_file.hash" "C:\\sign_file.sign"
- tic file
- signature file
python script-verification2.py "C:\\hash_file.tic" "C:\\sign_file.sign"