import hashlib,binascii,getpass

pw = getpass.getpass(prompt="Password: ")
confirm_pw = getpass.getpass(prompt="Enter Password again: ")

while pw != confirm_pw:
  print("Passwords do not match")
  pw = getpass.getpass(prompt="Password: ")
  confirm_pw = getpass.getpass(prompt="Enter Password again: ")

try:
    hash = hashlib.new('md4',pw.encode('utf-16le')).hexdigest()
except ValueError as e:
    try:
        from Crypto.Hash import MD4
        hash = MD4.new(pw.encode('utf-16le')).hexdigest()
    except ImportError:
        raise e

print(hash)
input("Press enter to continue")
