Skip to content

Password #584

Open
Open

Description

@suner8676-eng

generate_password function to allow users to specify the desired complexity, with flags for including/excluding digits and punctuation. This would provide more flexibility for users who may have varying security requirements or restrictions

Activity

  1. damianoecker26 commented on Sep 18, 2026

    @damianoecker26

    =True, include_punctuation=True`.

    1. Refine Draft:
  2. jadayaanaliah26 commented on Oct 21, 2026

    @jadayaanaliah26

    If we implement these flags, how should the function handle the case where length is smaller than the sum of required character types to avoid ValueError or an infinite loop?

  3. keenstack709 commented on Nov 20, 2026

    @keenstack709

    To address @jadayaanaliah26's concern about the length constraint, we could implement a check that calculates the minimum required length based on the provided boolean flags before generating the string. If length is insufficient, we should either raise a custom ValueError with a descriptive message or automatically increase the length to satisfy the complexity requirements. Alternatively, we could default to filling the remaining length with random characters from the enabled categories to avoid the infinite loop entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions