This patch addresses inconsistent code style and enforces it with a
gate for future submissions.
Separate work will be done in the future to address several of the
PEP8 ignores for docstrings, and attempt to bring the tests directory
to PEP8 compliance.
This patch:
1. Updates .style.yapf to set the knobs desired for YAPF.
2. Updates tox.ini to allow one of the knobs to work.
3. Removes unused code from several __init__.py files.
4. Updates the YAPF version in test-requirements.txt to latest (this
is needed for several knobs to work).
5. Stylistic changes to the python codebase in Pegleg.
6. Updates to tox.ini to run YAPF during PEP8 check.
Change-Id: Ieaa0fdef2b601d01c875d64b840986e54df73abf
This patch aims to:
1. Validate that generated cryptographic strings (salts and passphrases)
contain at least one uppercase letter, lowercase letter, number and
symbol before returning it to the user.
2. Add new unit tests for the cryptostring methods.
3. Move existing unit tests for cryptostring methods to new test file.
4. Rename test_generate_cryptostring to test_passphrases as this is
more accurate of the tests contained in the file.
Change-Id: I669831fb515209467b236cca63502f64a9263d86
Certain characters when used in various applications cause them to behave
unexpectedly. Remove these characters to be more generic and support a
wider variety of applications.
Change-Id: I021c4045e52b0637de3353ae6a3acf4709fb698b
The rstr library relies on the normal random.SystemRandom() and does not
perform additional functionalites that would require a whole dependency
to be added to pegleg. This patch set places in the logic into pegleg's
crypto generation rather than using the whole rstr library.
Change-Id: I20c0ceae8ac7d11468f325cd6a4cc035fc176b14
Signed-off-by: Tin Lam <tin@irrational.io>
Salts and Passphrases are both strings used in cryptography. This patch:
1. Adds CLI generation of salt
2. Adds unit test for CLI generation of salt
3. Updates passphrase.py code to be more generic as it is used to generate
both a passphrase and a salt
4. Update name of passphrase.py to be more generic
5. Update all references to, and tests of passphrase.py
6. Add documentation for CLI generation of salt
Co-Authored-By: chittibabu <cg329x@att.com>
Change-Id: I71858d63a2846290d22be96686ccfea3ba8aa6c0