eas-dotnet
1.0.8
See the version list below for details.
dotnet add package eas-dotnet --version 1.0.8
NuGet\Install-Package eas-dotnet -Version 1.0.8
<PackageReference Include="eas-dotnet" Version="1.0.8" />
<PackageVersion Include="eas-dotnet" Version="1.0.8" />
<PackageReference Include="eas-dotnet" />
paket add eas-dotnet --version 1.0.8
#r "nuget: eas-dotnet, 1.0.8"
#:package eas-dotnet@1.0.8
#addin nuget:?package=eas-dotnet&version=1.0.8
#tool nuget:?package=eas-dotnet&version=1.0.8
eas-dotnet
This C# SDK is intended to be used in conjunction with making a user account at Encryption API Service and uptaining a API key to generate a token. The SDK makes authenticated API calls to the main EAS API. We have done ton's of work for you on the API side of things organizing and researching some of the most popular and performant crytographic packages and implementing them in the systems level language Rust. We have also saved you the time of learning to work with Rust FFI in our performant_encryption crate which is what the API calls in this SDK are utilizing.
The Nuget package homepage can be located here.
Examples
ED25519-Dalek (Signatures)
// Insert your API Key located in the EAS user dashboard into this string.
EASConfiguration.ApiKey = "";
// Get our authentication token based on the ApiKey.
string token = await new TokenCache().GetToken();
ED25519DalekService dalek = new ED25519DalekService();
var keyPair = await dalek.GenerateKeyPair(token);
string dataToSign = "DataToSignWithDalk2";
ED25519DalekSignResponse signatureResponse = await dalek.Sign(token, keyPair.KeyPair, dataToSign);
// This will be a value of false because our signature data is different than the data we are verifying.
ED25519DalekVerifyResponse verifyResponse = await dalek.Verify(token, signatureResponse.PublicKey, signatureResponse.Signature, "123");
Password Hasing (Argon2)
// Insert your API Key located in the EAS user dashboard into this string.
EASConfiguration.ApiKey = "";
// Get our authentication token based on the ApiKey.
string token = await new TokenCache().GetToken();
PasswordService passwordService = new PasswordService();
string password = "MyBadPasswordToHash";
// One-way hash the password
string encryptedPassword = await passwordService.Argon2HashPassword(token, password);
// Check is the user supplied password is the same password as the one supplied
bool isValid = await passwordService.Argon2VerifyPassword(token, encryptedPassword, password);
RSA Key Pair Generation, Encrypt, and Decrypt
// Insert your API Key located in the EAS user dashboard into this string.
EASConfiguration.ApiKey = "";
string token = await new TokenCache().GetToken();
string dataToEncrypt = "DataToEncrypt#($*#$(*#$(";
RsaService rsaService = new RsaService();
// Get an RSA 4096 bit key pair
RsaGetKeyPairResponse rsaKeyPair = await rsaService.GetRsaKeys(token, 4096);
Console.WriteLine(rsaKeyPair.PrivateKey + "\n");
Console.WriteLine(rsaKeyPair.PublicKey + "\n");
// Encrypt our string with the Public Key we generated
RsaEncryptWithPublicResponse encryptedResponse = await rsaService.EncryptWithPublicKey(token, rsaKeyPair.PublicKey, dataToEncrypt);
Console.WriteLine("Encrypted Data: {0}", encryptedResponse.EncryptedData);
// Decrypt our string with the Private Key we generated
RsaDecryptResponse decryptResponse = await rsaService.DecryptWithPrivateKey(token, rsaKeyPair.PrivateKey, encryptedResponse.EncryptedData);
Console.WriteLine("Decrypted Data : {0}", decryptResponse.DecryptedData);
Supporters / Dontations
This project is maintained through Apache 2.0.
| 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | 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.1
- Newtonsoft.Json (>= 13.0.2)
- System.IdentityModel.Tokens.Jwt (>= 6.25.1)
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.1.4 | 268 | 5/30/2023 |
| 1.1.3 | 267 | 5/18/2023 |
| 1.1.2 | 301 | 5/2/2023 |
| 1.1.1 | 315 | 4/11/2023 |
| 1.1.0 | 362 | 3/12/2023 |
| 1.0.9 | 352 | 3/12/2023 |
| 1.0.8 | 348 | 3/12/2023 |
| 1.0.7 | 378 | 2/26/2023 |
| 1.0.6 | 394 | 2/19/2023 |
| 1.0.5 | 381 | 2/18/2023 |
| 1.0.4 | 440 | 1/15/2023 |
| 1.0.3 | 431 | 1/15/2023 |
| 1.0.2 | 440 | 1/15/2023 |
| 1.0.1 | 450 | 12/18/2022 |