aviau / python-pass

For fun - I have decided to write pass in python
http://aviau.github.io/python-pass/
GNU General Public License v3.0
36 stars 17 forks source link

A more secure 'choice' for password generation. #17

Closed prabi closed 5 years ago

prabi commented 5 years ago

Python documentation states that the pseudo-random generator random.Random shouldn't be used for security purposes. Therefore, I switched the currently used random.choice in password generation code to secrets.choice on platforms where it's available, and random.SystemRandom's choice elsewhere. New code passes tox tests.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.09%) to 90.805% when pulling cae2ad7ad283db714f91a5fd9ea8d2a82c3e0b7c on prabi:better_generate into cbd0a048ae04a59c96ec6696c3c32e7b75936c86 on aviau:master.