ZayniFramework.Cryptography 2.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ZayniFramework.Cryptography --version 2.3.0
                    
NuGet\Install-Package ZayniFramework.Cryptography -Version 2.3.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="ZayniFramework.Cryptography" Version="2.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZayniFramework.Cryptography" Version="2.3.0" />
                    
Directory.Packages.props
<PackageReference Include="ZayniFramework.Cryptography" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZayniFramework.Cryptography --version 2.3.0
                    
#r "nuget: ZayniFramework.Cryptography, 2.3.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.
#addin nuget:?package=ZayniFramework.Cryptography&version=2.3.0
                    
Install ZayniFramework.Cryptography as a Cake Addin
#tool nuget:?package=ZayniFramework.Cryptography&version=2.3.0
                    
Install ZayniFramework.Cryptography as a Cake Tool

Cryptography module example.

Add CryptographySettings section in your app.config or web.config file.

<CryptographySettings symmetricAlgorithmKeyPath="~\ZayniCryptoTest.key">
    <AesEncryptor keySize="128"/>
    <RijndaelEncryptor blockSize="256" keySize="256"/>
    <HashEncryptor needSalt="true"/>
</CryptographySettings>

You will also need to use KeyMaker to generate a symmetric algorithm key. See Source/SDKTools/Zayni.Cryptography.KeyMaker.<br/> Or you can use the DefaultKey.key in ZayniFramework.<br/>

The DeaultKey.key

o6iPM3HirEntMdZqd0t5i7yYOTmJrJon8SHfE87SV6ivxKCxrQu2mkJh7A0rGwqYO0lsLscVsRYbO3a4GoRROm1M9ZX37ECYFAWw
BnUGGlKbmhOIlDLr9MPX3q8IPpRKKCVkbA5K9SsAV0SbttOIZnXODw1KfCpQK0HZCdga80ifSF22OWOVQ8jWd6We9kevcSoUirOF
YFTlBGUJTwaXiXibYn6Nyq2j4cgaE6IQ6XeHyCWQbUgvyUYFWLufCPUhCjhYYt4Me9RArQcLHflT96jY3R3sBbDg2w4EUwqhQJGp
IjNE6RVHPs9vEWUrMJ0mglLg92jyqlGgmSfYPhEkX4T5dAAWTmgBmsoWOf53hVQdcR8lpuRe4FEcHF3xrCV345stc9AjcA21dpRB
tOCJXn1m1f2pu8rONYc2UtvU67ZnUNlAnOgQqNjrv2Urk7JJgt8YTieySgDPEDIcsq2VRRWyoj5SP3jxmF6aEDf5jgw9AJdijqys

Then you can encrypt or decrypt something like:

ISymmetricEncryptor encryptor = SymmetricEncryptorFactory.Create( _encryptMode );
string source = "ABCDEFG_HIJKLMN_OPQRST_UVW_XYZ";
string result = encryptor.Encrypt( source );
string plain  = encryptor.Decrypt( result );

You can also use the HASH algorithm like:

string userId   = "SomeUserIdHere";
string password = "SomePasswordHere";

IHashEncryptor encryptor = HashEncryptorFactory.Create( "sha256" );
string result = encryptor.HashEncrypt( password, saltKey: userId );
Product 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. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
8.0.142 183 3/19/2024
8.0.141 164 1/4/2024
8.0.140 173 12/17/2023
6.0.138 141 3/19/2024
6.0.137 259 9/20/2023
6.0.136 182 9/14/2023
6.0.135 204 9/10/2023
6.0.134 213 7/12/2023
6.0.133 208 7/10/2023
6.0.132 206 7/7/2023
6.0.131 205 6/19/2023
6.0.130 209 6/19/2023
6.0.129 549 7/2/2022
6.0.128 633 1/16/2022
6.0.127 618 1/15/2022
6.0.126 525 1/15/2022
6.0.125 371 1/8/2022
6.0.125-hotfix1 259 1/8/2022
6.0.124 385 1/7/2022
6.0.123 443 11/14/2021
5.0.129 549 7/2/2022
5.0.128 558 1/16/2022
5.0.125 393 1/8/2022
5.0.124 361 1/7/2022
5.0.123 551 11/14/2021
5.0.122 548 10/11/2021
5.0.121 623 5/1/2021
3.1.137 250 9/20/2023
3.1.136 187 9/14/2023
3.1.135 191 9/10/2023
3.1.134 216 7/12/2023
3.1.133 202 7/11/2023
3.1.132 175 7/8/2023
3.1.131 206 6/19/2023
3.1.130 368 2/1/2023
3.1.129 558 7/2/2022
3.1.128 495 1/16/2022
3.1.125 405 1/8/2022
3.1.124 355 1/7/2022
3.1.123 527 11/14/2021
3.1.122 593 10/11/2021
3.1.121 609 5/1/2021
2.31.120 530 3/14/2021
2.30.115 542 3/6/2021
2.30.114 520 3/6/2021
2.20.101 524 3/1/2021
2.19.3 515 2/11/2021
2.19.2 552 2/6/2021
2.19.1 574 1/6/2021
2.19.0 547 1/1/2021
2.18.3 667 12/27/2020
2.18.2 639 8/29/2020
2.18.1 623 8/26/2020
2.18.0 612 8/20/2020
2.17.135 596 8/19/2020
2.17.134 678 7/28/2020
2.17.133 669 7/27/2020
2.17.132 716 7/18/2020
2.17.131 680 7/11/2020
2.16.130 713 6/13/2020
2.15.128 724 6/3/2020
2.15.127 766 5/31/2020
2.15.126 705 4/30/2020
2.14.122 711 4/13/2020
2.13.100 670 3/12/2020
2.12.51 659 2/18/2020
2.11.50 706 2/10/2020
2.10.44 671 1/30/2020
2.9.43 814 1/11/2020
2.8.42 745 1/10/2020
2.8.41 666 1/5/2020
2.7.40 731 1/2/2020
2.7.39 780 1/2/2020
2.7.38 855 1/1/2020
2.6.37 709 12/23/2019
2.6.35 682 12/4/2019
2.6.1 644 12/2/2019
2.6.0 677 11/28/2019
2.5.2 883 11/26/2019
2.5.1 753 11/12/2019
2.5.0 697 11/9/2019
2.4.3 701 10/16/2019
2.4.2 747 10/16/2019
2.4.1 766 9/20/2019
2.3.113 499 3/6/2021
2.3.112 523 3/6/2021
2.3.28 766 9/19/2019
2.3.27 731 8/30/2019
2.3.26 739 8/20/2019
2.3.25 732 8/12/2019
2.3.22 760 7/31/2019
2.3.21 768 7/20/2019
2.3.20 772 6/22/2019
2.3.19 810 6/14/2019
2.3.18 793 6/13/2019
2.3.17 751 6/13/2019
2.3.15 815 6/8/2019
2.3.14 774 6/8/2019
2.3.13 820 5/30/2019
2.3.12 673 5/24/2019
2.3.11 654 5/24/2019
2.3.10 685 5/21/2019
2.3.9 673 5/9/2019
2.3.8 683 5/8/2019
2.3.7 719 4/30/2019
2.3.6 775 4/23/2019
2.3.5 771 4/19/2019
2.3.4 714 4/18/2019
2.3.3 730 4/17/2019
2.3.2 703 4/6/2019
2.3.1 800 12/15/2018
2.3.0 861 12/7/2018
2.2.6 805 11/25/2018
2.2.1 817 11/17/2018
2.2.0 820 11/16/2018
2.1.0 872 11/15/2018
2.0.1 868 11/6/2018
2.0.0 903 11/4/2018