[Cryptography-dev] x509 Certificate Fingerprint Format

André Caron andre.l.caron at gmail.com
Tue Feb 12 11:27:25 EST 2019


FYI, you might also like this version:

Python 3:
':'.join('%02x' % b for b in s)

Python 2:
':'.join('%02x' % ord(b) for b in s)


On Tue, Feb 12, 2019 at 10:29 AM Gilbert Mendoza <gmendoza at gmail.com> wrote:

> Thank you, Alexander. Your solution is much cleaner.  Your Python Kung Fu
> is strong.  :-)
>
> hash = ":".join([hex(h)[2:].upper() for h in hash_bytes])
>> print(hash)
>> '76:E1:81:9F:AD:F0:6A:55:EF:4B:12:6A:2E:F7:43:C2:BA:E8:A1:51'
>>
>
> Thanks, again!
>
> Sincerely,
>
> Gilbert
> _______________________________________________
> Cryptography-dev mailing list
> Cryptography-dev at python.org
> https://mail.python.org/mailman/listinfo/cryptography-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20190212/205b4a82/attachment.html>


More information about the Cryptography-dev mailing list