LibCommonSecrets 0.9.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package LibCommonSecrets --version 0.9.0
NuGet\Install-Package LibCommonSecrets -Version 0.9.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LibCommonSecrets" Version="0.9.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LibCommonSecrets --version 0.9.0
#r "nuget: LibCommonSecrets, 0.9.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LibCommonSecrets as a Cake Addin
#addin nuget:?package=LibCommonSecrets&version=0.9.0

// Install LibCommonSecrets as a Cake Tool
#tool nuget:?package=LibCommonSecrets&version=0.9.0

CSharp-CommonSecrets

CSharp library implementation of CommonSecrets format.

What is CommonSecrets

CommonSecrets is specification for storing encrypted and plaintext login information (username, password, URL etc.), notes and files.

Build status

CircleCI

What could I do with it

You can e.g. create your own password manager that is compatible with CommonSecrets specifications.

How to use

  1. Either use nuget package (that is upcoming) OR download src folder content and add it to your project
  2. Create CommonSecretsContainer and add stuff to it
  3. Serialize it to your chosen data-interchange format (JSON, XML, YAML etc.)
  4. Deserialize the content and continue to add stuff to it
  5. Jump back to step 3.

Same in actual code, step 2.

using CSCommonSecrets;

// Create CommonSecretsContainer
CommonSecretsContainer csc = new CommonSecretsContainer();

string password = "dragon667";
byte[] initialCounter1 = new byte[] { 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff };
SettingsAES_CTR settingsAES_CTR1 = new SettingsAES_CTR(initialCounter1);
SymmetricKeyAlgorithm skaAES = new SymmetricKeyAlgorithm(SymmetricEncryptionAlgorithm.AES_CTR, 256, settingsAES_CTR1);

KeyDerivationFunctionEntry kdfe = KeyDerivationFunctionEntry.CreateHMACSHA256KeyDerivationFunctionEntry("master");

byte[] derivedPassword = kdfe.GeneratePasswordBytes(password);

// Add Key Derivation Function to CommonSecretsContainer
csc.keyDerivationFunctionEntries.Add(kdfe);

// Add Login Information secret
csc.loginInformationSecrets.Add(new LoginInformationSecret(new LoginInformation("My site", "https://example.com", "CoolGuy1990", "NobodyKnows1!"), kdfe.GetKeyIdentifier(), skaAES, derivedPassword));

step 3.

using CSCommonSecrets;
using System.Text.Json;
using System.Text.Json.Serialization;

string json = JsonSerializer.Serialize(csc, serializerOptions);

step 4.

using CSCommonSecrets;
using System.Text.Json;
using System.Text.Json.Serialization;

CommonSecretsContainer cscDeserialized = JsonSerializer.Deserialize<CommonSecretsContainer>(json);

License

Library and its source code are licensed under Unlicense, so you might use these as you wish.

Version history

0.1 First public release (this has NOT happened yet)

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.9.6 330 12/9/2021
0.9.5 480 3/14/2020
0.9.4 434 1/18/2020
0.9.3 538 1/4/2020
0.9.2 472 12/27/2019
0.9.1 448 11/28/2019
0.9.0 466 11/4/2019