PyMOTW: hmac - O'Reilly ONLamp Blog

PyMOTW: hmac - O'Reilly ONLamp Blog: "import hmac
import hashlib

digest_maker = hmac.new('secret-shared-key-goes-here', '', hashlib.sha1)

f = open('hmac_sha.py', 'rb')
try:
while True:
block = f.read(1024)
if not block:
break
digest_maker.update(block)
finally:
f.close()

digest = digest_maker.hexdigest()
print digest

- Sent using Google Toolbar"

Comments

Popular posts from this blog

Repair corrupt Outlook PST files with two Microsoft utilities

ReadyNAS default login and password

Positive stories about back surgery