SHA-256: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: mentioning the eagerness of the implementation)
(→‎{{Header|Python}}: Python 3 as well as 2)
Line 424: Line 424:
Python has a standard module for this:
Python has a standard module for this:
<lang python>>>> import hashlib
<lang python>>>> import hashlib
>>> hashlib.sha256( "Rosetta code" ).hexdigest()
>>> hashlib.sha256( "Rosetta code".encode() ).hexdigest()
'764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf'
'764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf'
>>> </lang>
>>> </lang>