FmgLib.Cryption
1.0.7
See the version list below for details.
dotnet add package FmgLib.Cryption --version 1.0.7
NuGet\Install-Package FmgLib.Cryption -Version 1.0.7
<PackageReference Include="FmgLib.Cryption" Version="1.0.7" />
paket add FmgLib.Cryption --version 1.0.7
#r "nuget: FmgLib.Cryption, 1.0.7"
// Install FmgLib.Cryption as a Cake Addin #addin nuget:?package=FmgLib.Cryption&version=1.0.7 // Install FmgLib.Cryption as a Cake Tool #tool nuget:?package=FmgLib.Cryption&version=1.0.7
Install
This package provides encryption operations. In order to include the package in the project; From the Program.cs file:
builder.Services.AddFmgLibCryption("jsonPath");
code should be added.
public class MyClass
{
ICryption _cryption;
IPasswordCryption _passwordCryption;
public MyClass(ICryption cryption, IPasswordCryption passwordCryption)
{
_cryption = cryption;
_passwordCryption = passwordCryption;
}
public void crypt()
{
var temp = _cryption.Encryption("Hello, World!");
Console.WriteLine();
Console.WriteLine(_cryption.Decryption(temp));
}
}
you can use it easily.
Or if you don't want to add it via Program.cs, you can use it like this;
public class MyClass
{
Cryption _cryption = new Cryption();
PasswordCryption _passwordCryption = new PasswordCryption();
public void crypt()
{
var temp = _cryption.Encryption("Hello, World!");
Console.WriteLine();
Console.WriteLine(_cryption.Decryption(temp));
}
}
It encrypts according to the string you have specified and the 5 prime numbers you have specified. Thus, it becomes impossible to decrypt your password, because the encryption sequence and numbers are kept by you alone.
In your .json file should be kept like this:
{
"FmgLibCryption": {
"Chars": "$IJP#FGK%OH@!4S[TU5bc(de>fgC<Dh-tuEv+no/*a_ij}x]L7kly2VW{X36B8w0?;qr9m)ps:AMR=YZ^z1&NQ",
"Numbers": "4987,11,7907,239,7213"
}
}
Things to consider in .json format:
1- 'FmgLibCryption', 'Numbers' and 'Chars' key names should be written exactly like this.
2- 'Numbers' must have exactly 5 number values in its value. (In case of missing, the remaining numbers are taken as 0. In case of excess, the numbers written in excess are not taken into account.)
3- You must separate the numbers in the value of the 'Numbers' with the ',' character.
4- You can change the value for the 'Chars' as you wish. Likewise, you can change the values for the 'Numbers' as you wish. (Since these values are used in the encryption method, your encryption will vary depending on the values here.)
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. |
-
net7.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.