Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # this is from The Python
- # Standard Library by example
- # ISBN13: 9780321767349
- import hmac
- import hashlib
- digest_maker = hmac.new('secret-key', '', hashlib.sha1)
- with open('hmac_sha.py', 'rb') as f:
- while True:
- block = f.read(1024)
- if not block:
- break
- digest_maker.update(block)
- digest = digest_maker.hexdigest()
- print digest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement