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 hashlib
- import sys
- try:
- hash_name = sys.argv[1]
- except IndexError:
- print 'Specify the hash name as the first argument.'
- else:
- try:
- data = sys.argv[2]
- except IndexError:
- from hashlib_data import lorem as data
- h = hashlib.new(hash_name)
- h.update(data)
- print h.hexdigest()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement