在Python中加密字符串 [英] Encrypt string in Python
本文介绍了在Python中加密字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在Python中加密一个小字符串。是否可以使用密钥加密字符串?有没有一个很好的方法来做到这一点,并实现一个合理的加密级别,只使用Python库?
I need to encrypt a small string in Python. Is it possible to use a secret key to encrypt the string? Is there a good way to do this and achieve a reasonable encryption level using only Python libraries? Could you show me how to do this?
我知道密码学是相当基本的。
My knowledge about cryptography is quite basic.
推荐答案
我通过使用轻量级XTEA库解决了这个问题ASPN。它不需要任何额外的Python库,并且在实现可谐和的加密级别时非常简单。
I solved this by using a lightweight XTEA library that i found on ASPN. It doesn't require any additional Python libraries and is quite simple to implement whilst acheiving a resonable encryption level.
这篇关于在Python中加密字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文