{"title":"M2Crypto\u3067Message Digest","categories":["python","openssl"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fy0m0r.hateblo.jp%2Fentry%2F20130611%2F1370958926\" title=\"M2Crypto\u3067Message Digest - \u30e1\u30e2\u7f6e\u304d\u5834\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","published":"2013-06-11 22:55:26","provider_url":"https://hatena.blog","url":"https://y0m0r.hateblo.jp/entry/20130611/1370958926","author_url":"https://blog.hatena.ne.jp/yuheiomori0718/","blog_title":"\u30e1\u30e2\u7f6e\u304d\u5834","height":"190","width":"100%","image_url":null,"description":"# coding=utf-8 from binascii import hexlify import M2Crypto from M2Crypto.EVP import MessageDigest import hashlib # \u30d5\u30a1\u30a4\u30eb\u306esha1\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u8a08\u7b97(hashlib) sha1 = hashlib.sha1() sha1.update(open('file.txt', 'r').read()) print sha1.hexdigest() # => 03cfd743661f07975fa2f1220c5194cbaff48451 # \u30d5\u30a1\u30a4\u30eb\u306esha1\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u8a08\u7b97(M2Cr\u2026","type":"rich","author_name":"yuheiomori0718","version":"1.0","blog_url":"https://y0m0r.hateblo.jp/"}