rot_13を使った簡単な暗号化
DBなどにナマの情報を放り込むとやや不安なため、
簡易的な暗号化を実行
ソース
import codecs string="hogehoge1234" encrypted = codecs.encode(string,'rot_13') print(encrypted) decrypted = codecs.encode(encrypted,'rot_13') print(decrypted)
結果
ubtrubtr1234 hogehoge1234
参考
https://qiita.com/STomohiko/items/ff23b001b986015e9691
python 3.x - How to ROT13 encode in Python3? - Stack Overflow