added things

This commit is contained in:
2022-11-08 15:49:58 -03:00
parent bc193e29d3
commit ea22aff472
2 changed files with 13 additions and 0 deletions

12
Codificador.py Normal file
View File

@@ -0,0 +1,12 @@
import hashlib, base64
def codificar_senha(senha):
senha_encoded = senha.encode('utf-8')
digest = hashlib.sha512(senha_encoded).digest()
digest_b64_encoded = base64.b64encode(digest)
digest_b43_encoded_utf8_decoded = digest_b64_encoded.decode('utf-8')
return digest_b43_encoded_utf8_decoded
frase = input('#Digite as palavras da sua senha: ')
codificada = codificar_senha(frase)
print('\n# Senha codificada:', codificada)

1
VERSION Normal file
View File

@@ -0,0 +1 @@
0.1