Tolitech.Security.Cryptography
1.0.0-alpha01
dotnet add package Tolitech.Security.Cryptography --version 1.0.0-alpha01
NuGet\Install-Package Tolitech.Security.Cryptography -Version 1.0.0-alpha01
<PackageReference Include="Tolitech.Security.Cryptography" Version="1.0.0-alpha01" />
paket add Tolitech.Security.Cryptography --version 1.0.0-alpha01
#r "nuget: Tolitech.Security.Cryptography, 1.0.0-alpha01"
// 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 | Versions 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. |
-
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 | 75 | 6/16/2024 |