MtdKey.Cipher
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MtdKey.Cipher --version 1.0.0
NuGet\Install-Package MtdKey.Cipher -Version 1.0.0
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="MtdKey.Cipher" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MtdKey.Cipher --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MtdKey.Cipher, 1.0.0"
#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 MtdKey.Cipher as a Cake Addin
#addin nuget:?package=MtdKey.Cipher&version=1.0.0
// Install MtdKey.Cipher as a Cake Tool
#tool nuget:?package=MtdKey.Cipher&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MTD Key Cipher <img alt="NuGet" src="https://img.shields.io/nuget/v/MtdKey.Storage"/> <img alt="Licence MIT" src="https://img.shields.io/badge/licence-MIT-green"> <img alt="Platform" src="https://img.shields.io/badge/platform-.Net%207.0-blue">
The library for exchanging encrypted messages between different applications.
Allows messages to be exchanged kind of class objects.
var tokenModel = new TestTokenModel()
{
UserName = "John Doe",
Password = "password",
Items = new() { "first", "second" }
};
var secretKey = AesCore.GenerateSecretKey();
//It is an extension of the System.Security.Cryptography.Aes class
using Aes aes = Aes.Create();
var tokenEncrypted = aes.EncryptModel(tokenModel, secretKey);
var tokenDecrypted = aes.DecryptModel<TestTokenModel>(tokenEncrypted, secretKey);
The special AesManager class can be used as a dependent injection in the Asp.Net Web App.
builder.Services.AddAesMangerService(options => {
options.SecretKey = builder.Configuration["AesOptions:SecretKey"] ?? string.Empty;
options.KeySize = int.Parse(builder.Configuration["AesOptions:KeySize"] ?? "256");
});
public class IndexModel : PageModel
{
private readonly IAesManager aesManager;
public IndexModel(IAesManager aesManager)
{
this.aesManager = aesManager;
}
....
}
Examples of usage are located in the Tests or Web folders.
License
Copyright (c) – presented by Oleg Bruev.
MTDKey Cipher is free and open-source software licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Options (>= 7.0.1)
- Microsoft.IdentityModel.Tokens (>= 6.32.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.