Struct pwquality::PWQuality [] [src]

pub struct PWQuality { /* fields omitted */ }

Representation of an instance of pwquality. Each instance has its own settings, that can be changed.

Methods

impl PWQuality
[src]

[src]

Creates a new isntance with default settings.

[src]

Creates a new instance with default configuration.

[src]

Creates a new instance with given configuration file.

[src]

Creates a new instance with given configuration file. If None is passed, then default configuration is used.

[src]

Sets the minimum number of changes required between old and new password. A value of None disables the check.

[src]

Returns the minimum number of changes required between old and new password. Returns None if check is disabled.

[src]

Sets the minimum accepted length for a password. Any number less than 6 will be replaced by 6.

[src]

Returns the minimum accepted length for a password.

[src]

Sets the digit credit:

  • if credit >= 0, it represents the maximum credit for having digits in a password;
  • if credit < 0, it represents the minimum number of digits required in a password.

[src]

Returns the digit credit:

  • if credit >= 0, it represents the maximum credit for having digits in a password;
  • if credit < 0, it represents the minimum number of digits required in a password.

[src]

Sets the uppercase letter credit:

  • if credit >= 0, it represents the maximum credit for having uppercase letters in a password;
  • if credit < 0, it represents the minimum number of uppercase letters required in a password.

[src]

Returns the uppercase letter credit:

  • if credit >= 0, it represents the maximum credit for having uppercase letters in a password;
  • if credit < 0, it represents the minimum number of uppercase letters required in a password.

[src]

Sets the lowercase letter credit:

  • if credit >= 0, it represents the maximum credit for having lowercase letters in a password;
  • if credit < 0, it represents the minimum number of lowercase letters required in a password.

[src]

Returns the lowercase letter credit:

  • if credit >= 0, it represents the maximum credit for having lowercase letters in a password;
  • if credit < 0, it represents the minimum number of lowercase letters required in a password.

[src]

Sets the other character credit:

  • if credit >= 0, it represents the maximum credit for having other characters in a password;
  • if credit < 0, it represents the minimum number of other characters required in a password.

[src]

Returns the other character credit:

  • if credit >= 0, it represents the maximum credit for having other characters in a password;
  • if credit < 0, it represents the minimum number of other characters required in a password.

[src]

Sets the minimum required number of classes in a password. There a four available classes:

  • digits: [0-9]
  • lowercase letters: [a-z]
  • uppercase letters: [A-Z]
  • other characters: !$%&#…

[src]

Returns the minimum required number of classes in a password.

[src]

Sets the maximum size of allowed repeated characters sequences in a password. A value of 0 disables this check.

[src]

Returns the maximum size of allowed repeated characters sequences in a password.

[src]

Sets the maximum size of allowed characters sequences of a same class in a password. A value of 0 disables this check,

[src]

Returns the maximum size of allowed characters sequences of a same class in a password.

[src]

Sets the maximum size allowed for monotonic character sequences such as 12345 or fedcb in a password. A value of 0 disables this check.

[src]

Returns the maximum size allowed for monotonic character sequences such as 12345 or fedcb in a password.

[src]

Sets whether the check for the presence of words longer than 3 characters present in the passwd GECOS field of a user in a password is enabled.

[src]

Returns whether the check for the presence of words longer than 3 characters present in the passwd GECOS field of a user in a password is enabled.

[src]

Sets whether the check that a password is contained in a dictionary is enabled.

[src]

Returns whether the check that a password is contained in a dictionary is enabled.

[src]

Sets whether the check of username presence in a password is enabled.

[src]

Returns whether the check of username presence in a password is enabled.

[src]

Sets whether a password that does not pass the checks should be rejected.

[src]

Returns whether a password that does not pass the checks should be rejected.

[src]

Sets the path to the dictionary to use (other than the default cracklib one).

[src]

Returns the path to the dictionary to use (if any other than the default cracklib one).

[src]

Sets the list of words longer than 3 characters that are not allowed in a password. Words cannot contain whitespaces, otherwise will be considered as separate words.

[src]

Returns the list of forbidden words in a password.

[src]

Generates a password with the given number of bits of entropy.

[src]

Checks a password according to the settings and returns the computed score.

Trait Implementations

impl Debug for PWQuality
[src]

[src]

Formats the value using the given formatter.

impl Drop for PWQuality
[src]

[src]

Executes the destructor for this type. Read more