Skip to content

CredentialGenerator Class ​

Definition ​

Provides helpers for generating cryptographically secure passwords and secrets.

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

Methods ​

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 GenerateUrlSafeSecret(int length = null)Generates a cryptographically secure random secret encoded as unpadded Base64URL.

Remarks ​

Use GeneratePassword or GeneratePassword when a human-oriented password is needed and complexity rules must be enforced. Use GenerateUrlSafeSecret when a high-entropy machine secret is needed for scenarios such as client secrets, API keys, reset tokens, or other transport-safe credentials.