Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert Google Cloud Storage base64 md5sum to hexadecimal version?

Google cloud storage represents the md5hash of objects using base64 encoded values.

How can I convert those values to the hexadecimal versions reported by md5sum?

like image 428
Jeremy Lewi Avatar asked Jan 19 '16 04:01

Jeremy Lewi


1 Answers

You can use binascii.hexlify (or binascii.b2a_hex):

import base64
import binascii

print binascii.hexlify(base64.urlsafe_b64decode(md5_base64))
like image 140
falsetru Avatar answered Oct 12 '22 22:10

falsetru