Skip to content

GeneratePassword Method ​

Definition ​

  • Namespace: JASE.Crypto
  • Assembly: JASE.Crypto.dll

Overloads ​

NameDescription
string GeneratePassword()Generates a cryptographically secure password using the default password options.
string GeneratePassword(IPasswordOptions options)Generates a cryptographically secure password using the specified password options.
string GeneratePassword(int length)Generates a cryptographically secure password using the default password options adjusted for length.

string GeneratePassword() ​

csharp
string GeneratePassword()

Generates a cryptographically secure password using the default password options.

Returns ​

A randomly generated password based on Default.

Remarks ​

This method is intended for password generation where the default complexity rules are acceptable. For custom complexity requirements, use GeneratePassword.

string GeneratePassword(IPasswordOptions options) ​

csharp
string GeneratePassword(IPasswordOptions options)

Generates a cryptographically secure password using the specified password options.

Parameters ​

NameDescription
optionsThe password generation rules to apply.

Returns ​

A randomly generated password that satisfies the supplied complexity and composition rules.

Remarks ​

Use this overload when the caller must control password length, required character classes, or other complexity constraints.

string GeneratePassword(int length) ​

csharp
string GeneratePassword(int length)

Generates a cryptographically secure password using the default password options adjusted for length.

Returns ​

A randomly generated password based on Default.

Remarks ​

This method is intended for password generation where the default complexity rules are acceptable. For custom complexity requirements, use GeneratePassword.