kieranjol / IFIscripts

Detailed documentation is available here: http://ifiscripts.readthedocs.io/en/latest/index.html
http://ifiscripts.readthedocs.io/en/latest/index.html
MIT License
50 stars 34 forks source link

Dcpfixity - create sha1 manifest #34

Open kieranjol opened 8 years ago

kieranjol commented 8 years ago

Figure out how to get regular sha1s out of the base64/binary hashes and store as traditional sha1sum manifest.

kieranjol commented 8 years ago

Good idea - you should actually do this though.

kieranjol commented 6 years ago

Yeah ok - https://superuser.com/questions/1310804/derive-sha1-hash-from-openssl-binary-base64-value waiting for an answer to this.

kieranjol commented 6 years ago

Boom, got a reply - here's how to do it:

>>> import binascii
>>> import base64
>>> a = 'IxcfhXNHlw+1bbDFu0kp8KRylpU='
>>> b = base64.b64decode(a)
>>> binascii.hexlify(b).decode()
u'23171f857347970fb56db0c5bb4929f0a4729695'