mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-12-23 07:08:13 +00:00
ch10: Update hashlib excerpt for Python 3
This commit is contained in:
parent
65bd520926
commit
d10161ab82
@ -431,10 +431,10 @@ $ python
|
||||
----
|
||||
[source,pycon]
|
||||
----
|
||||
Python 2.7.1
|
||||
Python 3.7.3
|
||||
>>> import hashlib
|
||||
>>> print hashlib.sha256("I am Satoshi Nakamoto").hexdigest()
|
||||
5d7c7ba21cbbcd75d14800b100252d5b428e5b1213d27c385bc141ca6b47989e
|
||||
>>> hashlib.sha256(b"I am Satoshi Nakamoto").hexdigest()
|
||||
'5d7c7ba21cbbcd75d14800b100252d5b428e5b1213d27c385bc141ca6b47989e'
|
||||
----
|
||||
====
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user