LibAES-CTR 1.1.0

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

// Install LibAES-CTR as a Cake Tool
#tool nuget:?package=LibAES-CTR&version=1.1.0                

About

Managed .Net (.NET 8) compatible AES-CTR cipher written in C# (using Aes.Create for AES operations)

How to use

using CS_AES_CTR;

byte[] mySimpleTextAsBytes = Encoding.ASCII.GetBytes("Plain text I want to encrypt");

// In real world, generate these with cryptographically secure pseudo-random number generator (CSPRNG)
byte[] key = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
byte[] initialCounter = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05 };

// Encrypt
AES_CTR forEncrypting = new AES_CTR(key, initialCounter);			
byte[] encryptedContent = new byte[mySimpleTextAsBytes.Length];
forEncrypting.EncryptBytes(encryptedContent, mySimpleTextAsBytes);

// Decrypt
AES_CTR forDecrypting = new AES_CTR(key, initialCounter);
byte[] decryptedContent = new byte[encryptedContent.Length];
forDecrypting.DecryptBytes(decryptedContent, encryptedContent);

You can try out the code in .NET Fiddle

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on LibAES-CTR:

Package Downloads
Wabbajack.Downloaders.Bethesda

Package Description

LibCommonSecrets

.Net Standard 2.0 compatible managed CommonSecrets library implementation in C#

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on LibAES-CTR:

Repository Stars
wabbajack-tools/wabbajack
An automated Modlist installer for various games.
Version Downloads Last updated
1.1.0 200 12/8/2024
1.0.1 2,241 11/15/2023
1.0.0 27,858 5/24/2022
0.9.6 7,317 1/7/2021
0.9.5 815 9/17/2020
0.9.4 604 5/30/2020
0.9.3 732 5/17/2020
0.9.2 924 1/12/2020
0.9.1 1,514 1/26/2019
0.9.0 961 11/26/2018