AuthShield 1.0.0
dotnet add package AuthShield --version 1.0.0
NuGet\Install-Package AuthShield -Version 1.0.0
<PackageReference Include="AuthShield" Version="1.0.0" />
paket add AuthShield --version 1.0.0
#r "nuget: AuthShield, 1.0.0"
// Install AuthShield as a Cake Addin #addin nuget:?package=AuthShield&version=1.0.0 // Install AuthShield as a Cake Tool #tool nuget:?package=AuthShield&version=1.0.0
AuthShield
AuthShield
is a simple yet secure package for managing passwords using modern cryptographic techniques. It provides functionality to hash passwords with a unique salt and verify them securely.
Features
- Generates salted hashes for passwords using PBKDF2 with SHA-256.
- Verifies passwords against stored hashes.
- Utilizes secure random number generation and modern cryptographic practices.
Installation
You can install the AuthShield
package via NuGet. To install it, run the following command in the NuGet Package Manager Console:
- Install-Package AuthShield
Generating a Salted Hash
To generate a salted hash for a password, use the GenerateSaltedHash method from the PasswordManager class. This method creates a secure hash by combining a random salt with the password hash.
using AuthShield;
public class Program
{
public static void Main()
{
// Replace with the actual password you want to hash
string password = "your_password_here";
// Generate a salted hash
string hashedPassword = PasswordManager.GenerateSaltedHash(password);
// Output the hashed password
Console.WriteLine("Hashed Password: " + hashedPassword);
}
}
Verifying a Password
To verify a password against a previously generated hash, use the VerifyPassword method. This method checks if the input password matches the stored hash.
using AuthShield;
public class Program
{
public static void Main()
{
// Replace with the password you want to verify
string password = "your_password_here";
// Replace with the previously generated hashed password
string hashedPassword = "previously_generated_hashed_password";
// Verify the password
bool isPasswordValid = PasswordManager.VerifyPassword(password, hashedPassword);
// Output whether the password is valid or not
Console.WriteLine("Is Password Valid: " + isPasswordValid);
}
}
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 | 107 | 7/19/2024 |
Release Note: AuthShield v1.0
Excited to release AuthShield v1.0, a comprehensive solution for secure password management. This version introduces:
Modern Cryptographic Practices: Utilizes PBKDF2 with SHA-256 and RandomNumberGenerator for improved security.
Efficient Password Hashing: Provides functionality for generating and verifying salted password hashes.
Enhance your authentication systems with robust and up-to-date security features.