Created
January 23, 2017 16:29
-
-
Save chrisdl/eeed99d7a9edc4f1b2e0df60d00d6fca to your computer and use it in GitHub Desktop.
Where art thou verify?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(py27) ubuntu@ubuntu-xenial:/vagrant$ bpython | |
bpython version 0.16 on top of Python 2.7.12 /home/ubuntu/.virtualenvs/py27/bin/python | |
>>> from Crypto.Hash import HMAC | |
>>> import os | |
>>> import binascii | |
>>> key = binascii.hexlify(os.urandom(32)) | |
>>> msg = 'Hello World' | |
>>> my_hmac = HMAC.new(key=key, msg=msg) | |
>>> import Crypto | |
>>> Crypto.version_info | |
(2, 6, 1, 'final', 0) | |
>>> dir(my_hmac) | |
['__doc__', '__init__', '__module__', 'copy', 'digest', 'digest_size', 'digestmod', 'hexdigest', 'inner', 'outer', 'update'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment