Precitec.Security 1.0.5

dotnet add package Precitec.Security --version 1.0.5
                    
NuGet\Install-Package Precitec.Security -Version 1.0.5
                    
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="Precitec.Security" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Precitec.Security" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Precitec.Security" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Precitec.Security --version 1.0.5
                    
#r "nuget: Precitec.Security, 1.0.5"
                    
#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.
#:package Precitec.Security@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Precitec.Security&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Precitec.Security&version=1.0.5
                    
Install as a Cake Tool

🔐 Common.Security

A shared security library providing AES-256 encryption & decryption services for sensitive data such as API keys, passwords, and configuration secrets.


✅ Features

✔ AES-256 encryption and decryption
✔ Easy integration with .NET projects
✔ Optionally use environment variables for key storage
✔ CLI tool for quick encryption/decryption


📦 Installation

Install via your internal NuGet feed:

dotnet add package Common.Security --version 1.0.x

✅ Usage in Code

1. Add Reference

using Common.Security;

2. Encrypt & Decrypt

var service = new EncryptionService();

// Encrypt a value
var encrypted = service.Encrypt("MySensitiveValue");
Console.WriteLine($"Encrypted: {encrypted}");

// Decrypt back
var decrypted = service.Decrypt(encrypted);
Console.WriteLine($"Decrypted: {decrypted}");

⚙ Default Encryption Key

The default key is hardcoded in EncryptionService:

private const string EncryptionKey = "PXr7@Precitec_2025#SecureKey!!";

✅ CLI Tool: Precitec.EncryptionTool.CLI

This tool provides an interactive and command-line interface for encryption & decryption.


▶ Run Interactive Mode

dotnet run --project Precitec.EncryptionTool.CLI

Sample:

=== Precitec Encryption Tool ===
Type '<text> -e' to encrypt or '<encrypted> -d' to decrypt. Type 'exit' to quit.

> 123 -e
Encrypted: UFw0R2YTajlh+qnaa+25Ew==:1T7Q...
> UFw0R2YTajlh+qnaa+25Ew==:1T7Q... -d
Decrypted: 123

▶ Command-Line Arguments

Encrypt:

encryptiontool --encrypt "MySecret"

Decrypt:

encryptiontool --decrypt "<EncryptedText>"

📂 Folder Structure

/Common.Security
    /EncryptionService.cs
/Precitec.EncryptionTool.CLI
    /Program.cs

🔐 Why AES-256?

AES-256 ensures industry-standard encryption with strong security for sensitive application data.


✅ Future Features

  • ✅ Support for Key Vault integration
  • ✅ Base64 + Hex output modes
  • ✅ Secure random key generation
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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
1.0.5 391 7/31/2025