mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 05:52:41 +00:00
5b5361c9b0
* fix(scripts): fix `password-hash.py`
8 lines
254 B
Python
8 lines
254 B
Python
from Crypto.Hash import keccak
|
|
|
|
def hash_password(password, old_desktop=False):
|
|
hasher = keccak.new(digest_bits=256)
|
|
hasher.update(password.encode())
|
|
hash = hasher.hexdigest()
|
|
return '0x' + (hash.upper() if old_desktop else hash.lower())
|