ByteDev.Crypto
1.0.0
See the version list below for details.
dotnet add package ByteDev.Crypto --version 1.0.0
NuGet\Install-Package ByteDev.Crypto -Version 1.0.0
<PackageReference Include="ByteDev.Crypto" Version="1.0.0" />
<PackageVersion Include="ByteDev.Crypto" Version="1.0.0" />
<PackageReference Include="ByteDev.Crypto" />
paket add ByteDev.Crypto --version 1.0.0
#r "nuget: ByteDev.Crypto, 1.0.0"
#:package ByteDev.Crypto@1.0.0
#addin nuget:?package=ByteDev.Crypto&version=1.0.0
#tool nuget:?package=ByteDev.Crypto&version=1.0.0
ByteDev.Crypto
Provides simple cryptographic related classes for hashing/verifying and encrypting/decrypting data in .NET.
Installation
ByteDev.Crypto has been written as a .NET Standard 2.0 library, so you can consume it from a .NET Core or .NET Framework 4.6.1 (or greater) application.
ByteDev.Crypto is hosted as a package on nuget.org. To install from the Package Manager Console in Visual Studio run:
Install-Package ByteDev.Crypto
Further details can be found on the nuget page.
Code
The repo can be cloned from git bash:
git clone https://github.com/ByteDev/ByteDev.Crypto
Usage
Hashing
Simple example of hasing some clear text ("Password123") and verifying a guess is equal.
var service = new HashService();
string hash = service.Hash("Password123");
bool isLoginSuccessful = service.Verify("passwordGuess", hash);
Encryption
Simple example of encrypting a secret with a key and then decrypting it.
var algo = new RijndaelAlgorithm();
var keyFactory = new EncryptionKeyIvFactory(algo);
var keyIv = keyFactory.Create("Password1", Encoding.UTF8.GetBytes("someSalt"));
var service = new EncryptionService(algo);
byte[] cipher = service.Encrypt("mySecret", keyIv);
string clearText = service.Decrypt(cipher, keyIv); // clearText = "mySecret"
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. net9.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ByteDev.Crypto:
| Package | Downloads |
|---|---|
|
ByteDev.Testing.NUnit
.NET Standard library that provides some extra NUnit functionality. |
|
|
ByteDev.AirVpn.IpLeak
.NET Standard library to help communicate with the IP Leak API. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.0 | 27,592 | 10/14/2021 |
| 7.0.0 | 784 | 5/31/2021 |
| 6.1.0 | 523 | 5/24/2021 |
| 6.0.0 | 551 | 1/20/2021 |
| 5.1.1 | 566 | 1/18/2021 |
| 5.1.0 | 626 | 12/18/2020 |
| 5.0.2 | 1,757 | 7/2/2020 |
| 5.0.1 | 708 | 7/2/2020 |
| 5.0.0 | 669 | 6/8/2020 |
| 4.0.0 | 746 | 4/29/2020 |
| 3.3.0 | 656 | 4/25/2020 |
| 3.2.0 | 792 | 3/28/2020 |
| 3.1.0 | 717 | 3/25/2020 |
| 3.0.3 | 691 | 2/28/2020 |
| 3.0.1 | 731 | 11/8/2019 |
| 3.0.0 | 773 | 4/10/2019 |
| 2.1.0 | 801 | 3/7/2019 |
| 2.0.0 | 894 | 2/12/2019 |
| 1.2.0 | 878 | 12/17/2018 |
| 1.1.0 | 1,020 | 9/24/2018 |
| 1.0.0 | 1,080 | 8/17/2018 |