Identity.NET 6.0.0.7

dotnet add package Identity.NET --version 6.0.0.7
NuGet\Install-Package Identity.NET -Version 6.0.0.7
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="Identity.NET" Version="6.0.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Identity.NET --version 6.0.0.7
#r "nuget: Identity.NET, 6.0.0.7"
#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 Identity.NET as a Cake Addin
#addin nuget:?package=Identity.NET&version=6.0.0.7

// Install Identity.NET as a Cake Tool
#tool nuget:?package=Identity.NET&version=6.0.0.7

Nuget

Provides a Persistent Unique Identifier for the current PC and facility to Encrypt and Decrypt strings using that Identity

Default Usage

Initialize an Identity based on the UUID of the Local PC

UniqueIdentity.Initialize("PasswordBasedIdentifierSecureString");

Use that Identity to Encrypt a SecureString

UniqueIdentity.Encrypt(SecureString, "AdditionalPassword");

Use that Identity to Decrypt a SecureString

UniqueIdentity.Decrypt(SecureString, "AdditionalPassword");

Get the global UUID for the Local PC as a string

string identity = UniqueIdentity.UUID;

Encrypt/Decrypt SecureString

You can use an Identity based on the UUID of the Local PC to Encrypt/Decrypt SecureStrings

If you provide a SecureString PlainText with a SecureString Password a SecureString CipherText will be returned

SecureString CipherText = UniqueIdentity.Encrypt(SecureStringPlainText,  SecureStringPassword);
SecureString PlainText = UniqueIdentity.Decrypt(CipherText, SecureStringPassword);

It is safe to use the Default Identity to Encrypt/Decrypt because of the additional password.

Checking ID

alternate text is missing from this package README image

When you Initialize() the Identity it will return a Status Messsage that indicates if the Identity was created/loaded correctly or an Error Message if it wasn't.

You can use this information in your application to decide what to do next.

Validation String

Successfully initializing an Identity will also produce a Validation String you can save and use during subsequent initializations to check if your keys are still valid to decrypt data you have previously encrypted.

alternate text is missing from this package README image

You can use UniqueIdentity.CheckSample() to check the Validation String

alternate text is missing from this package README image

If everything is still working, CheckSample() will return true

Salt

You can change the salt with SetSaltBytes but a stronger password would be better

alternate text is missing from this package README image

You should do this before you call Initialize

Password / Hardware Changes

If you lose your password your data will be lost.

If you change the salt and you lose it, your data will be lost.

If you replace/damage your CPU your data will be lost.

If you replace/damage your Motherboard your data will be lost.

If you update/damage your TPM your data may be lost, "it depends".

Persistence

The Identity will persist even after OS Reinstall on any computer that meets the requirements to run Windows 11 and most computers running Windows 10

Will also work if you go from Windows 10 to Windows 11 or back again.

Copyright S Christison ©2023

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 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
6.0.0.7 72 4/11/2024