Inspired to safely store passwords of a user.

It encrypts and decrypts the text provided by the user.

It was built using python and the cryptography module in python

I am proud that I was able to write a code to encrypt and decrypt a password.

# To encrypt and decrypt a password

from cryptography.fernet import Fernet
key = Fernet.generate_key()
cipher_suite = Fernet(key)

password = input("Enter a password \n")
password = bytes(password, 'utf-8')
ciphered_text = cipher_suite.encrypt(password)  


print("Encrypted ")
print(ciphered_text,"\n") 

unciphered_text = (cipher_suite.decrypt(ciphered_text))
unciphered_text = unciphered_text.decode('utf-8')
print("Decrpyted")
print(unciphered_text,"\n")



Built With

Share this project:

Updates