Base64 encoding is in the standard library and will do to stop shoulder surfers:
>>> import base64
>>> print(base64.b64encode("password".encode("utf-8")))
cGFzc3dvcmQ=
>>> print(base64.b64decode("cGFzc3dvcmQ=").decode("utf-8"))
password
More Related Contents:
- What are the risks of running ‘sudo pip’?
- Security of Python’s eval() on untrusted strings?
- I need to securely store a username and password in Python, what are my options? [closed]
- hash function in Python 3.3 returns different results between sessions
- Is distributing python source code in Docker secure?
- Change to sudo user within a python script
- Securely Erasing Password in Memory (Python)
- Python 3, Are there any known security holes in ast.literal_eval(node_or_string)?
- Mark data as sensitive in python
- Is a SQLAlchemy query vulnerable to injection attacks?
- Is this Python code vulnerable to SQL injection? (SQLite3)
- Create a temporary FIFO (named pipe) in Python?
- Securely storing passwords for use in python script [duplicate]
- Encrypted and secure docker containers
- Google Authenticator implementation in Python
- Do CSRF attacks apply to API’s?
- What’s the purpose of Django setting ‘SECRET_KEY’?
- Remove multiples of numbers out of a list – Python
- Non blocking subprocess.call
- PyQT: how to open new window
- efficiently checking that string consists of one character in Python
- How to know which Python is running in Jupyter notebook?
- Login to website using python
- How can I simulate input to stdin for pyunit?
- How to remove specific substrings from a set of strings in Python? [duplicate]
- How does unicodedata.normalize(form, unistr) work?
- Using itertools.product and want to seed a value
- Why shouldn’t I use PyPy over CPython if PyPy is 6.3 times faster?
- My matplotlib.pyplot legend is being cut off
- How to convert csv to json in python?