sillsdev / SIL.PasswordStore

Cross-platform keyring for Windows and Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross-platform password store

SIL.PasswordStore implements a cross-platform keyring for Windows and Linux that allows to securely store passwords and other secrets. It uses the native libraries on each platform (libsecret-1 on Linux, WinCred on Windows).

NuGet version (SIL.PasswordStore) Build, Test and Pack

When to use

  • Do NOT use this library if you're implementing a service and need to authenticate your users. Instead store a salt and a hash of the password.
  • However, if you're implementing a tool that makes use of other services like GitHub or NuGet and you want to cache the password or token so that the user doesn't have to type the password each time he uses the tool, then this library might be for you.

Usage

Very easy. service should identify the application, then simply call one of the methods:

PasswordStore.SetPassword(service, user, password);
password = PasswordStore.GetPassword(service, user);
PasswordStore.DeletePassword(service, user);

Similar projects

There are few other projects that implement cross-platform keyring/password storage. If you know of others let me know.

  • go-keyring - similar project which gave the inspiration to this implementation. Implemented in Go.

About

Cross-platform keyring for Windows and Linux

License:MIT License


Languages

Language:C# 100.0%