An alternative implementation for getpass that echoes masked password (such as asterisks)
Project description
getpass_asterisk
An alternative implementation for getpass that echoes masked password (such as asterisks).
Security Note
:warning: This module has been modified to add getpass_asterisk, which can echo asterisks in place of password. Echoing of masked password leaks the length of the password. Use this utility only in a scenario where passwords are always of fixed length. This utility was created to receive secret tokens as input which are always of same size. Echoing the asterisks helped improve user experience. Use at your own risk. Only use for taking constant length secret inputs.
Installation
pip can be used to install getpass_asterisk.
pip install getpass_asterisk
Usage
Usage is identical to getpass.
# getpass_asterisk(prompt[, stream]) - Prompt for a password, with masked output.
from getpass_asterisk.getpass_asterisk import getpass_asterisk
password = getpass_asterisk("Enter password: ")
Feedback
For feedback, contact: Muhammad Akbar (akbarATsecursive.com).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file getpass_asterisk-1.0.1.tar.gz
.
File metadata
- Download URL: getpass_asterisk-1.0.1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cc357a924cf62fa4e15b73cb4e5e30685c9084e464ffdc3fd9000a2b54ea9e9 |
|
MD5 | bede3e1e00e52d46a9ba5f80dd692f20 |
|
BLAKE2b-256 | 94bde7881421894068b030e91c649a731ed0461d1d0517fd3abd283cf0a4b832 |
File details
Details for the file getpass_asterisk-1.0.1-py3.8.egg
.
File metadata
- Download URL: getpass_asterisk-1.0.1-py3.8.egg
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b6125fa123225818ea5418b583602120a49f302e3d5fc2e0e55e815f2372db7 |
|
MD5 | 92f29638618e8b9fdf566a99dadb9053 |
|
BLAKE2b-256 | dcd1267610e21695894df518bee2ebb8830c7c92958addb7b9fc69ead2b105b8 |
File details
Details for the file getpass_asterisk-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: getpass_asterisk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20d45cafda0066d761961e0919728526baf7bb5151fbf48a7d5ea4034127d857 |
|
MD5 | e57883247243c5059f0cd9497c30fed7 |
|
BLAKE2b-256 | 3b6e1fcbc1b7ce80869892b7825eb2baf7e999417db891fe5688d07a2e0f2469 |