Ask coding questions

← Back to all posts
How do you make an decodable and decodable string function?
Coder100 (16976)

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.

Answered by a5rocks (821) [earned 5 cycles]
View Answer
a5rocks (821)

Well, there's .decode('utf-8') and .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.