PasswordGenerator 2.1.0
dotnet add package PasswordGenerator --version 2.1.0
NuGet\Install-Package PasswordGenerator -Version 2.1.0
<PackageReference Include="PasswordGenerator" Version="2.1.0" />
paket add PasswordGenerator --version 2.1.0
#r "nuget: PasswordGenerator, 2.1.0"
// Install PasswordGenerator as a Cake Addin #addin nuget:?package=PasswordGenerator&version=2.1.0 // Install PasswordGenerator as a Cake Tool #tool nuget:?package=PasswordGenerator&version=2.1.0
Password Generator
A .NET Standard library which generates random passwords with different settings to meet the OWASP requirements
NuGet
Install via NuGet: Install-Package PasswordGenerator
Or click here to go to the package landing page
It is Compatible with .NET Core, .NET Framework and more. See the below chart:
Basic usage
See examples below or try them out now in your browser using Dotnetfiddle
// By default, all characters available for use and a length of 16
// Will return a random password with the default settings
var pwd = new Password();
var password = pwd.Next();
// Same as above but you can set the length. Must be between 8 and 128
// Will return a password which is 32 characters long
var pwd = new Password(32);
var password = pwd.Next();
// Same as above but you can set the length. Must be between 8 and 128
// Will return a password which only contains lowercase and uppercase characters and is 21 characters long.
var pwd = new Password(includeLowercase: true, includeUppercase: true, includeNumeric: false, includeSpecial: false, passwordLength: 21);
var password = pwd.Next();
Fluent usage
// You can build up your reqirements by adding things to the end, like .IncludeNumeric()
// This will return a password which is just numbers and has a default length of 16
var pwd = new Password().IncludeNumeric();
var password = pwd.Next();
// As above, here is how to get lower, upper and special characters using this approach
var pwd = new Password().IncludeLowercase().IncludeUppercase().IncludeSpecial();
var password = pwd.Next();
// This is the same as the above, but with a length of 128
var pwd = new Password(128).IncludeLowercase().IncludeUppercase().IncludeSpecial();
var password = pwd.Next();
// This is the same as the above, but with passes the length in using the method LengthRequired()
var pwd = new Password().IncludeLowercase().IncludeUppercase().IncludeSpecial().LengthRequired(128);
var password = pwd.Next();
// One Time Passwords
// If you want to return a 4 digit number you can use this:
var pwd = new Password(4).IncludeNumeric();
var password = pwd.Next();
// Specify your own special characters
// You can now specify your own special characters
var pwd = new Password().IncludeLowercase().IncludeUppercase().IncludeNumeric().IncludeSpecial("[]{}^_=");
var password = pwd.Next();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (12)
Showing the top 5 NuGet packages that depend on PasswordGenerator:
Package | Downloads |
---|---|
FEB.ClusterAdmin.Models
Package Description |
|
CocoriCore.Security
Package Description |
|
DanSaul.SharedCode
Package Description |
|
Rbit.Common
Provides RBIT libraries commonly used in new projects. |
|
Boxfusion.SheshaFunctionalTests.Common.Domain
Package Description |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on PasswordGenerator:
Repository | Stars |
---|---|
Stealerium/Stealerium
Stealer + Clipper + Keylogger
|
|
shesha-io/shesha-framework
An open-source Low-Code development framework for .NET developers. Create .NET based business applications with 80% less code.
|
|
Crypto-Notepad/Crypto-Notepad
🔑 Simple notepad for Windows with encryption features
|
Version | Downloads | Last updated |
---|---|---|
2.1.0 | 4,833,170 | 1/4/2022 |
2.0.5 | 2,078,496 | 12/30/2019 |
2.0.4 | 15,196 | 12/16/2019 |
2.0.3 | 4,548 | 12/11/2019 |
2.0.2 | 2,215 | 12/9/2019 |
2.0.1 | 106,970 | 9/20/2019 |
2.0.0 | 16,946 | 9/4/2019 |
1.1.3 | 59,408 | 6/9/2019 |
1.1.2 | 70,189 | 11/16/2016 |
1.1.1 | 2,485 | 11/13/2016 |
1.1.0 | 2,490 | 11/13/2016 |
1.0.0 | 6,202 | 11/12/2016 |
Removed usage of RNG Crypto Provider
Compatible with .NET Core, .NET Framework and .NET Standard
Added ability to get a group of passwords in one call