Your question has already been answered, but this snippet of your code can be improved.
while senha_cripto != 'batata':
print("Senha incorreta, tente novamente!")
senha_cripto = str(input("Senha para criptografar:")).strip()
if senha_cripto == 'batata':
break;
To:
from hashlib import sha256
while sha256(senha_cripto.encode()).hexdigest() != 'f4610aa514477222afac2b77f971d069780ca2846f375849f3dfa3c0047ebbd1':
print("Senha incorreta, tente novamente!")
senha_cripto = str(input("Senha para criptografar:")).strip()
And do not presse this code.
if senha_cripto == 'batata':
break;
Simply because, it is not an infinite loop while(True)
, because it will be interrupted as soon as you hit the password.