FirebaseAESLib 1.0.0

dotnet add package FirebaseAESLib --version 1.0.0
                    
NuGet\Install-Package FirebaseAESLib -Version 1.0.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="FirebaseAESLib" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FirebaseAESLib" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="FirebaseAESLib" />
                    
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 FirebaseAESLib --version 1.0.0
                    
#r "nuget: FirebaseAESLib, 1.0.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.
#addin nuget:?package=FirebaseAESLib&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=FirebaseAESLib&version=1.0.0
                    
Install as a Cake Tool

๐Ÿ“˜ README โ€“ How to Use FirebaseAESLib ๐Ÿ”ง Step 1: Install NuGet Packages in Your App In your app project (Console, MAUI, etc):

dotnet add package DotNetEnv dotnet add package Google.Cloud.Firestore dotnet add package FirebaseDatabase.net

๐Ÿ“ Step 2: Create .env File in App Project Root env

Firestore

FIREBASE_PROJECT_ID=your-project-id GOOGLE_APPLICATION_CREDENTIALS=./serviceAccountKey.json

Realtime DB

FIREBASE_DATABASE_URL=https://your-db.firebaseio.com/ FIREBASE_DATABASE_SECRET=your-legacy-db-secret

AES

AES_KEY=base64-aes-key AES_IV=base64-aes-iv Generate a 256-bit AES key & IV (in base64):

using System.Security.Cryptography;

var aes = Aes.Create(); Console.WriteLine(Convert.ToBase64String(aes.Key)); // AES_KEY Console.WriteLine(Convert.ToBase64String(aes.IV)); // AES_IV ๐Ÿงช Step 3: Example Usage in Your App

using DotNetEnv; using FirebaseAESLib;

Env.Load(); // Load .env variables

var aes = new AesEncryptor( Environment.GetEnvironmentVariable("AES_KEY"), Environment.GetEnvironmentVariable("AES_IV") );

// Firestore setup var firestore = new FirestoreService( Environment.GetEnvironmentVariable("FIREBASE_PROJECT_ID"), Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS"), aes );

// Realtime DB setup var realtime = new RealtimeDatabaseService( Environment.GetEnvironmentVariable("FIREBASE_DATABASE_URL"), Environment.GetEnvironmentVariable("FIREBASE_DATABASE_SECRET"), aes );

// Sample encrypted user object var user = new Dictionary<string, object> { { "name", "Kevin" }, { "email", "kevin@example.com" }, { "verified", true } };

// Store encrypted await firestore.SetEncryptedAsync("users", "user1", user); await realtime.SetEncryptedAsync("users/user1", user);

// Retrieve decrypted var firestoreDecrypted = await firestore.GetDecryptedAsync("users", "user1"); var realtimeDecrypted = await realtime.GetDecryptedAsync("users/user1");

Console.WriteLine("Firestore: " + Newtonsoft.Json.JsonConvert.SerializeObject(firestoreDecrypted)); Console.WriteLine("Realtime: " + Newtonsoft.Json.JsonConvert.SerializeObject(realtimeDecrypted));

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
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.0 102 6/25/2025