Skip to content

qgindi/Passwords

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Simple password manager for C# scripts

In scripts, it's common to use passwords, API keys, and other sensitive credentials. To safeguard them from theft or leaks (via script sharing, GitHub, etc), you can use this password manager.

This code gets a password. Here "test" is not a password; it's a password's name. The password is saved in a file (encrypted).

/*/ c Passwords.cs; /*/

string pw = Passwords.Get("test");
print.it(pw);

The first time it shows a password input dialog and saves the password (encrypted). Also shows a key input dialog if a key for this computer/user still not saved. To avoid password/key input dialogs at an inconvenient time, you can at first save passwords at a convenient time:

  • Use the password manager dialog: run the password manager source file (Passwords.cs) or call Passwords.ShowManagerUI.
  • Or call Passwords.Get or Passwords.Save.

Setup

To use in LibreAutomate, import file Passwords.cs.

To use elsewhere, add file Passwords.cs to your C# project. Also add NuGet package LibreAutomate.

Also you may want to edit some values in the settings region. Recommended: change the _entropy value (make it unique).

More info

Read Passwords class documentation comments.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages