from microbit import *
from hashing import *
from mb_file import *
from mb_disp import *
from mb_music import *

disp_clr()
password1= input("Enter new password: ")
password2= input("Enter password again: ")
if password1 == password2:
  password_hash = sha_hash(password1)
  write_file("password.txt",password_hash)
  print("New password set!")
  music.play('music.BA_DING')
  display.show("Image.YES")
else:
  print("Passwords do not match, please\ntry again...")
  music.play('music.DADADADUM')
  display.show("Image.NO")
