FastAes 1.0.1

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

// Install FastAes as a Cake Tool
#tool nuget:?package=FastAes&version=1.0.1                

About

Managed .Net (Standard 2.0, .NET 6 and .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

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.1 2,978 12/28/2023
1.0.0 127 12/28/2023