Obfuscate strings in Python

后端 未结 6 1343
伪装坚强ぢ
伪装坚强ぢ 2021-01-02 08:54

I have a password string that must be passed to a method. Everything works fine but I don\'t feel comfortable storing the password in clear text. Is there a way to obfuscate

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 09:28

    The base64 answer is good for obfuscating the password and will work with no user intervention at the cost of being insecure. If the user can be logged in with access to a system keyring service, take a look at the keyring package. I used it to store passwords on both OS X and Linux systems.

提交回复
热议问题