Tolitech.Security.Cryptography 1.0.0-alpha01

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

// Install Tolitech.Security.Cryptography as a Cake Tool
#tool nuget:?package=Tolitech.Security.Cryptography&version=1.0.0-alpha01&prerelease

Tolitech.Security.Cryptography

Overview

This repository provides essential security utilities tailored for .NET applications, focusing on robust encryption and hashing functionalities. It includes two main components: Cipher for AES encryption and Hasher for cryptographic hashing.

Features

Cipher (AES Encryption)

The Cipher class offers advanced AES encryption capabilities, ensuring secure data transmission and storage. It supports:

Dynamic Key and IV Generation: Automatically generates unique AES keys and initialization vectors (IVs) for each encryption operation.

Text and File Encryption: Encrypts both plaintext strings and byte arrays representing files with ease.

Efficient CryptoStream Integration: Seamlessly integrates with .NET's CryptoStream for efficient data encryption.

Hasher (Cryptographic Hashing)

The Hasher class provides robust cryptographic hashing utilities, essential for data integrity verification and password storage. Key features include:

Salted Hash Generation: Generates salted hashes using secure hashing algorithms like SHA-512.

Password Hashing: Supports secure password hashing using PBKDF2 with SHA-512, enhancing resistance against brute-force attacks.

Simple API: Offers straightforward methods for hashing strings with optional salt input.

Usage

Cipher Usage Example:


string plainText = "Hello, world!";
string encryptedText = Cipher.Encrypt(plainText, out string key, out string iv);
string decryptedText = Cipher.Decrypt(encryptedText, key, iv);
Console.WriteLine($"Decrypted text: {decryptedText}");

Hasher Usage Example:


string password = "securePassword123";
string hashedPassword = Hasher.HashPassword(password);
bool passwordMatches = Hasher.VerifyPassword(password, hashedPassword);
Console.WriteLine($"Password matches: {passwordMatches}");

Installation

To use these security utilities in your .NET projects, simply include the Tolitech.Security.Cryptography namespace and start leveraging the Cipher and Hasher classes.

Contact

For any questions or feedback, feel free to open an issue or reach out to contato@tolitech.com.br.

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.0-alpha01 49 6/16/2024