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 |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on PasswordGenerator:
Package | Downloads |
---|---|
CocoriCore.Security
Package Description |
|
FEB.ClusterAdmin
API to simplify the administration of a kubernetes cluster |
|
Rbit.Common
Provides RBIT libraries commonly used in new projects. |
|
Olmi.Core.Utils
The utilities of OLMI framework. |
|
PasswordGeneration
Create password for apps (ASP.NET Core & Xamarin & Desktop ...) |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on PasswordGenerator:
Repository | Stars |
---|---|
Stealerium/Stealerium
Stealer + Clipper + Keylogger
|
|
Crypto-Notepad/Crypto-Notepad
🔑 Simple notepad for Windows with encryption features
|
Version | Downloads | Last updated |
---|---|---|
2.1.0 | 1,028,044 | 1/4/2022 |
2.0.5 | 1,589,650 | 12/30/2019 |
2.0.4 | 10,473 | 12/16/2019 |
2.0.3 | 3,095 | 12/11/2019 |
2.0.2 | 883 | 12/9/2019 |
2.0.1 | 92,037 | 9/20/2019 |
2.0.0 | 13,879 | 9/4/2019 |
1.1.3 | 57,278 | 6/9/2019 |
1.1.2 | 61,332 | 11/16/2016 |
1.1.1 | 1,207 | 11/13/2016 |
1.1.0 | 1,139 | 11/13/2016 |
1.0.0 | 1,603 | 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