mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-05-08 18:08:54 +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]
|
[source,pycon]
|
||||||
----
|
----
|
||||||
Python 2.7.1
|
Python 3.7.3
|
||||||
>>> import hashlib
|
>>> import hashlib
|
||||||
>>> print hashlib.sha256("I am Satoshi Nakamoto").hexdigest()
|
>>> hashlib.sha256(b"I am Satoshi Nakamoto").hexdigest()
|
||||||
5d7c7ba21cbbcd75d14800b100252d5b428e5b1213d27c385bc141ca6b47989e
|
'5d7c7ba21cbbcd75d14800b100252d5b428e5b1213d27c385bc141ca6b47989e'
|
||||||
----
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user