Ask coding questions

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

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 (502) [earned 5 cycles]
View Answer
Commentshotnewtop
1
a5rocks (502)

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.