jcoaks / python-script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-script

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.

Install requirements

pip install -r requirements.txt

Use hash script

Parameters

  • origin folder
  • destination folder

python script-hash.py "C:\\folder_ori" "C:\\folder_dest"

Use sign script

Parameters

  • origin folder
  • private key

python script-sign.py "C:\\folder_ori" "C:\\KEYS\\clavePribHomologacion.key"

Use verification script

Parameters

  • hash file
  • signature file

python script-verification.py "C:\\hash_file.hash" "C:\\sign_file.sign"

Use verification script 2

Parameters

  • tic file
  • signature file

python script-verification2.py "C:\\hash_file.tic" "C:\\sign_file.sign"

About


Languages

Language:Python 100.0%