Skip to main content

f-passwords-generator

Strong Passwords Generator made with python.

Attributes

  • text (can be modified, have getter and setter): The plain text to be ciphered.
  • key (can be modified, have getter and setter): The key phrase to be used in the ciphering operation on algorithms like playfair (default is 'password').
  • shift (can be modified, have getter and setter): The number to be used as shift on algorithms like caesar (default is 3).
  • algorithm (can be modified, have getter and setter): The algorithm to be used for ciphering operation (default is playfair).
  • characters_replacements (cannot be modified, have only getter): Custom dictionary you can use to change characters after ciphering (default is empty).
  • matrix (cannot be modified, have only getter): The matrix used in the ciphering operation.

Methods

  • replace_character(char: str, replacement: str): used to add an item to characters_replacements.
  • reset_character(char: str): remove the character from characters_replacements if exists.
  • generate_password(): generate a password from the text using key or shift according to the used algorithm and characters_replacements.
  • generate_raw_password(): generate a password from the text using key or shift according to the used algorithem without characters_replacements.

How to use

from passwords_generator import PasswordGenerator

pass_gen = PasswordGenerator(text=None, key="password", shift=3, algorithm="playfair")
pass_gen.text = "demo text"
pass_gen.key = "demo key"  # will be used on algorithms like playfair (default is 'password')
pass_gen.shift = 3  # will be used on algorithms like caesar (default is 3)
pass_gen.algorithm = 'playfair'  # specify the algorithm to use (default is playfair)
pass_gen.replace_character(char="", replacement="")
pass_gen.reset_character(char="")
password = pass_gen.generate_password()

Examples

Example 1

from passwords_generator import PasswordGenerator

pass_gen = PasswordGenerator("demo code", "demo key")
password = pass_gen.generate_password()

Example 2

from passwords_generator import PasswordGenerator

pass_gen = PasswordGenerator()
pass_gen.text = "demo text"
pass_gen.key = "demo key"
password = pass_gen.generate_password()

Example 3

from passwords_generator import PasswordGenerator

pass_gen = PasswordGenerator("demo text", shift=3, algorithm="caesar")
password = pass_gen.generate_password()

Example 4

from passwords_generator import PasswordGenerator

pass_gen = PasswordGenerator()
pass_gen.text = "demo text"
pass_gen.shift = 3
pass_gen.algorithm = 'caesar'
password = pass_gen.generate_password()

Notice

The valid cipher algorithms are only those who has been implemented on cipherspy package.

  • caesar
  • playfair (default one)

License

The code in this repository is licensed under the MIT License.

You can find the full text of the license in the LICENSE file. For more information, please visit the repository on GitHub.

Metadata

Release files for f-passwords-generator 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for f-passwords-generator 2.1.0
File Size Uploaded Provenance Actions
f-passwords-generator-2.1.0.tar.gz 3.5 kB Without provenance Details for f-passwords-generator-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for f-passwords-generator 2.1.0
File Interpreter ABI Platform Actions
f_passwords_generator-2.1.0-py3-none-any.whl Python 3 none any Details for f_passwords_generator-2.1.0-py3-none-any.whl

Total release size: 7.6 kB

Release files / f-passwords-generator-2.1.0.tar.gz

Download URL f-passwords-generator-2.1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eafc52888c4537c35f9ea7bc7b5a213491006102878ec00d843176f1221834a9
BLAKE2b-256 checksum
How to use checksums
63993e27edf8da33a94b0979848cc9acee80cc57295361c8c4412d96119744e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / f_passwords_generator-2.1.0-py3-none-any.whl

Download URL f_passwords_generator-2.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a0be2290c8e0bd5210d7148dd71d4cd0714d4af7ca249479b7a4de6c83b9229
BLAKE2b-256 checksum
How to use checksums
045a8e35893038a1b6c6e71416b70c1ad62f992c5975a08f48efd8a56e159b0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for f-passwords-generator 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page