Generates memorable strong passwords.
Project description
# password-generator:
Generates a memorable (by pattern), strong (long and mixed characters) passwords.
# Install
`pip install password_gen`
# Documentation
`generate(pattern, dictionary, digits, characters)`: Generates password
>`pattern:{string: d - number, wi - word of length i, s - any special character} specify pattern of the password. Ex 'w3-d.w5!' -> cat-1.horse!`
>`dictionary:{list} a list of preferred words`
>`digits:{list} a list specifying the range of digits. Ex [2, 8] -> digits from 2 to 7`
>`characters:{list} a list specifying the range of ascii values of special characters. Ex [33, 36] -> '!, ~, #, $'`
# Usage
``` python
import password_gen as pg
print( pg.generate() )
# with all parameters
print( pg.generate('w5-dd-w3.d',['willy', 'wonka', 'and', 'the', 'chocolate', 'factory'], [3, 8], [35, 38]))
# -> "Wonka-55-the.6"
# with some parameter
print( pg.generate('d.w4.d.w5!') )
# -> "2.PrAy.0.Filed!"
print( pg.generate(dictionary=['willy', 'wonka', 'and', 'the', 'chocolate', 'factory']) )
# -> "6wOnkA(and,ChocolatE&willy4"
print( pg.generate(digits=[2,5], characters=[33, 35]) )
# -> "#outsourcing4frequent5wArehoUse3sTreaM#"
```
Generates a memorable (by pattern), strong (long and mixed characters) passwords.
# Install
`pip install password_gen`
# Documentation
`generate(pattern, dictionary, digits, characters)`: Generates password
>`pattern:{string: d - number, wi - word of length i, s - any special character} specify pattern of the password. Ex 'w3-d.w5!' -> cat-1.horse!`
>`dictionary:{list} a list of preferred words`
>`digits:{list} a list specifying the range of digits. Ex [2, 8] -> digits from 2 to 7`
>`characters:{list} a list specifying the range of ascii values of special characters. Ex [33, 36] -> '!, ~, #, $'`
# Usage
``` python
import password_gen as pg
print( pg.generate() )
# with all parameters
print( pg.generate('w5-dd-w3.d',['willy', 'wonka', 'and', 'the', 'chocolate', 'factory'], [3, 8], [35, 38]))
# -> "Wonka-55-the.6"
# with some parameter
print( pg.generate('d.w4.d.w5!') )
# -> "2.PrAy.0.Filed!"
print( pg.generate(dictionary=['willy', 'wonka', 'and', 'the', 'chocolate', 'factory']) )
# -> "6wOnkA(and,ChocolatE&willy4"
print( pg.generate(digits=[2,5], characters=[33, 35]) )
# -> "#outsourcing4frequent5wArehoUse3sTreaM#"
```
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
password_gen-0.2.9.tar.gz
(71.5 kB
view details)
File details
Details for the file password_gen-0.2.9.tar.gz.
File metadata
- Download URL: password_gen-0.2.9.tar.gz
- Upload date:
- Size: 71.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc3dfd46b52de82bd25e5539e56243548fe49b36e60692f96932c819c9d930ad
|
|
| MD5 |
0eb27d2ac76715346a0fd7bf634fa28a
|
|
| BLAKE2b-256 |
5f5ac832ca09f2aa2cbe9feb1fed96cd47a961e6b35b58b63a8866ca98b7d3e9
|