PassWordsCore 2.1.0

There is a newer version of this package available.
See the version list below for details.
Install-Package PassWordsCore -Version 2.1.0
dotnet add package PassWordsCore --version 2.1.0
<PackageReference Include="PassWordsCore" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PassWordsCore --version 2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PassWordsCore, 2.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install PassWordsCore as a Cake Addin
#addin nuget:?package=PassWordsCore&version=2.1.0

// Install PassWordsCore as a Cake Tool
#tool nuget:?package=PassWordsCore&version=2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


A brand new core

Create easy a password manager

Step 1: Create database file

using PassWordsCore;
//Your code logic

//Initialize db

//Create PassWords database

Step 2: Login into database

static Database db = new Database();

Step 3: Create account

//Create account object
var account = new Account()
  Username = "Test",
  Password = "Test123",
  Title = "MyAccount",
  Description = "Test the account",
  Type = "Email"
//Add account to current database

Step 4: Get accounts

List<Account> accounts = db.GetAccounts();

Step 5: Edit account

var testaccount = accounts.FirstOrDefault(a => a.Title == "MyAccount");
testaccount.Title = "HelloWorld";

Step 6: Delete account

var testaccount = accounts.First(a => a.Title == "MyAccount");

Step 7: Change database password


Step 8: Backup database


Step 8b: Import database


Step 9: Delete database


Step 10: List databases

List<DB> alldatabases = Database.ListDatabases();

Step 11: Delete all databases/the databases file


Two factor authentication

You can use 2FA for making the login to the database more secure, but you can also use PassWords to validate a 2FA login into another system.

Using 2FA in PassWords

//First, login into your database
static Database db = new Database();

//Second, enable 2FA login

//Third, get your secret
//Use this secret into another 2FA app
string secret = db.Get2FA();


//When you login now, 
//you will get

//Now you have to use your 2FA app and enter the code:
db.Login2FA("000000");//your code
//If returns true, you are logged in

//Remove 2FA from database: (first login() and login2fa())

Validating another application that uses 2FA using PassWords

//First, update an account and set the TwoFactorSecret property to your secret
var testaccount = accounts.First(a => a.Title == "MyAccount");
testaccount.TwoFactorSecret = "MYSECRET";

//Second, login into an application with MyAccount

//Generate key (remember => every 30 seconds it changes so you have to generate a new one) 
string code = Database.GenerateCode("MYSECRET");
//Enter the code and log in.

Generate a random string

Database.RandomString(10,true); //Length = 10, letters = true
Database.RandomString(15,true,true,true,true); //Length = 15, letters, capitals numbers and special chars

For further or more detailed usage of PassWordsCore, see the wiki (that will be added in the future)

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.2 316 8/16/2019
2.1.1 273 8/3/2019
2.1.0 274 7/5/2019
2.0.3 293 6/27/2019
2.0.2 275 6/27/2019
2.0.1 270 6/27/2019
1.0.0 294 6/25/2019

Update: Made encryption 10000 times faster.
NOTES: This version does not work with databases from earlier versions.
I'm sorry, but in future updates the databases will be backwards-compatible, i promess!