Surprisingly difficult to find a straight answer to this on Google.
I’m wanting to collect a piece of text and a message from a user such as
Then I want to be able to encrypt/decrypt the message with the text somehow so that I can save it in my database and not worry about the data being exposed if my website gets hacked,
encrypt('1PWP7a6xgoYx81VZocrDr5okEEcnqKkyDc', 'hello world')
Is there a simple way to achieve this with python and please can someone provide/direct me to an example.
Perhaps an example of how to create public/private key pairs using a seed such as
Many thanks in advance 🙂
EDIT: Just to be clear I’m looking for a way to encrypt my users data in a determanistic way not obfuscate the message.
If that means I have to generate a PGP/GPG pub/pri key pair on the fly by using the text
1PWP7a6xgoYx81VZocrDr5okEEcnqKkyDc as a seed then that’s fine but what’s the method to do this?