Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 621 Bytes

raw_hash.rst

File metadata and controls

23 lines (15 loc) · 621 Bytes

Raw Hash Functions

The nacl library comes with sha256 and sha512 hashing libraries. They do not seem to offer any benefit over python's hashlib, but for completeness they are included. Creating a hash of a message is very simple:

import libnacl

msg = 'Is there someone else up there we could talk to?'
h_msg = libnacl.crypto_hash(msg)

crypto_hash defaults to sha256, sha512 is also available:

import libnacl

msg = 'Is there someone else up there we could talk to?'
h_msg = libnacl.crypto_hash_sha512(msg)