For programmers to need to create HASH value and verify digital signature with MAC by python,this tested source code is useful.
Hash and digital signature algorithm support md5/sha1/sha256/sha224/sha384/sha512.
Specification
ID | STCD_0000000005 |
Language | Python |
Steps | 200 |
Purpose | Create hash and digital digital signature. |
Function | Create hash(‘md5’/’sha1’/’sha256’/’sha224’/’sha384’/’sha512’). Create digital signature with HMAC. Verify digital signature with HMAC. |
Environment | Anaconda3(Python 3.9.7) IDE : Visual Studio Code hashlib hmac |
Restriction | free license You can use source code copy as owner . You can customize and distribute it freely. |
Price | 7 dollars or 700 yen (Pay with PayPal) |
References | https://kaworu.jpn.org/python/Python%E3%81%A7hmac%E3%82%92%E8%A8%88%E7%AE%97%E3%81%99%E3%82%8B https://docs.python.org/ja/3/library/hashlib.html http://liibercraft.com/archives/632 https://techbureau-api-document.readthedocs.io/ja/latest/trade/3_how_to_implement/1_python.html https://ja.pymotw.com/2/hmac/ |
Source Code




Test Result
NO | test case | result |
01 | hash algorithm pattern test – md5/sha1/sha256/sha224/sha384/sha512 | OK |
02 | digital signature algorithm pattern test – md5/sha1/sha256/sha224/sha384/sha512 | OK |
Test Code
*) Modify “path” along your PC environment.



History
23/11/2022 created
Provider Profile
Nick name is “Dead Fish” employed as an engineer in Japan.
I am grad if you need my code.
Thanks !
Download
Get download passwordFollowing files and data are zipped.
└── HashClass.py
Remarks
None
Comments