I am using Python 3 I have an Auth_INI ConfigParser file with usernames mapped to passwords. I need to encrypt the password with the password so only the password can decrypt it.
> Auth_INI = ConfigParser()
> password = 'password'
> password_encrypted = encrypt(password,'password')
> Auth_INI['username'] = password_encrypted
All it needs to be is somekind of difficult hash/unhash encoding perhaps. I do not require anything too fancy. No keyrings, just plain text encoded/unencoded.
With this encryption scheme I can easily verify a person by decrypt(password,'guessword') != 'guessword'
and there is no reason to do anything more than this.
Is anyone able to recommend an encryption/Encoding library that works like this?
Right now I am just using urlsafe_b64encode('password') and there is no password to decode the password so essentially there is no encryption for the password. Please do help...