(entropy, password_profile)
| 100 | |
| 101 | |
| 102 | def _render_password(entropy, password_profile): |
| 103 | rules = _get_configured_rules(password_profile) |
| 104 | excluded_chars = ( |
| 105 | password_profile["exclude"] if "exclude" in password_profile else "" |
| 106 | ) |
| 107 | set_of_characters = _get_set_of_characters(rules, excluded_chars) |
| 108 | password, password_entropy = _consume_entropy( |
| 109 | "", entropy, set_of_characters, password_profile["length"] - len(rules) |
| 110 | ) |
| 111 | characters_to_add, character_entropy = _get_one_char_per_rule( |
| 112 | password_entropy, rules, excluded_chars |
| 113 | ) |
| 114 | return _insert_string_pseudo_randomly( |
| 115 | password, character_entropy, characters_to_add |
| 116 | ) |
| 117 | |
| 118 | |
| 119 | def generate_password(password_profile, master_password): |
no test coverage detected