I am trying to use SHA-3(keccak) in python.This is my code.
import sys
import hashlib
if sys.version_info < (3, 6):
import sha3
s = hashlib.sha3_512()
s.name
s.digest_size
s.update(b"data")
s.hexdigest()
The error I get is as follows.
Traceback (most recent call last):
File "sha3.py", line 4, in <module>
import sha3
File "/home/hello/Documents/SHA-3/sha3.py", line 5, in <module>
s = hashlib.sha3_512()
AttributeError: 'module' object has no attribute 'sha3_512'