Hashed password:
This part is only for licenses.chemaxon.com server
SHA1 hashed password:
- passlib
from passlib.hash import sha512_crypt
import hashlib
password = Element("password")
def crypt(*args, **kwargs):
if not password.element.value:
return None
password_input = password.element.value
password_hash = sha512_crypt.hash(password_input, rounds=5000)
Element("output").element.innerHTML = password_hash
sha1 = hashlib.sha1()
sha1.update(bytes(password_input, 'ascii'))
sha1_hash = sha1.hexdigest().upper()
Element("output-sha1").element.innerHTML = sha1_hash
password.clear()
def add_event(e):
if e.key == "Enter":
crypt()
password.element.onkeypress = add_event