I am wondering if there was a simple function that takes a string and then encrypts it and also has an option to decrypt it.
.encode('utf-8') in python, but all those do is change the string to a bytestring. I would go onto the package site for the lang you are using (pypi, npm, etc.), and just search up
cryptography. Check out the description, and use the one that you like the most.