Edi.PasswordGenerator 3.0.0

dotnet add package Edi.PasswordGenerator --version 3.0.0
                    
NuGet\Install-Package Edi.PasswordGenerator -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Edi.PasswordGenerator" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Edi.PasswordGenerator" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Edi.PasswordGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Edi.PasswordGenerator --version 3.0.0
                    
#r "nuget: Edi.PasswordGenerator, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Edi.PasswordGenerator@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Edi.PasswordGenerator&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Edi.PasswordGenerator&version=3.0.0
                    
Install as a Cake Tool

Edi.PasswordGenerator

.NET Build and Pack

Generate Chromium-style passwords with cryptographically secure randomness.

Install from NuGet

dotnet add package Edi.PasswordGenerator
NuGet\Install-Package Edi.PasswordGenerator
<PackageReference Include="Edi.PasswordGenerator" Version="3.0.0" />

Usage

.NET

var generator = new PasswordGenerator();

// Uses the Chromium-style defaults: 15 characters, letters and numbers,
// with ambiguous characters excluded.
var password = generator.GeneratePassword();

// Customize the character classes and length.
var customPassword = generator.GeneratePassword(new ChromiumPasswordOptions
{
    Length = 24,
    UseUppercase = true,
    UseLowercase = true,
    UseNumbers = true,
    UseSymbols = true,
    ExcludeAmbiguous = true
});

DefaultPasswordGenerator remains available as a compatibility name for PasswordGenerator. The pre-3.0.0 algorithm is available explicitly through LegacyPasswordGenerator and PasswordRule.

ASP.NET Core

Register IPasswordGenerator in the DI container.

services.AddTransient<IPasswordGenerator, PasswordGenerator>();
[HttpGet("password/generate")]
[ProducesResponseType(StatusCodes.Status200OK)]
public IActionResult GeneratePassword([FromServices] IPasswordGenerator passwordGenerator)
{
    var password = passwordGenerator.GeneratePassword();
    return Ok(new
    {
        ServerTimeUtc = DateTime.UtcNow,
        Password = password
    });
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Edi.PasswordGenerator:

Repository Stars
EdiWang/Moonglade
Blog system of https://edi.wang
Version Downloads Last Updated
3.0.0 129 9/2/2026
2.3.0 4,022 11/13/2025
2.2.0 3,097 8/4/2025
2.1.0 3,688 11/13/2024
2.0.0 3,269 8/27/2024
1.2.0 3,245 5/19/2024
1.1.0 4,143 10/11/2023
1.0.0 3,869 6/9/2023