MirzaCryptoHelpersV2 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MirzaCryptoHelpersV2 --version 2.0.0                
NuGet\Install-Package MirzaCryptoHelpersV2 -Version 2.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="MirzaCryptoHelpersV2" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MirzaCryptoHelpersV2 --version 2.0.0                
#r "nuget: MirzaCryptoHelpersV2, 2.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 MirzaCryptoHelpersV2 as a Cake Addin
#addin nuget:?package=MirzaCryptoHelpersV2&version=2.0.0

// Install MirzaCryptoHelpersV2 as a Cake Tool
#tool nuget:?package=MirzaCryptoHelpersV2&version=2.0.0                

MirzaCryptoHelpersV2

Lightweight helper library to perform common cryptographic operations. This helper library is wrapper from existing .NET framework library and was created to ease development when we have to deal with cryptography operations, hashing and conversions by simply wrapping all the related operations found in .NET Framework into streamlined classes, methods and extension methods.

Examples:

  1. Converting string to binary and otherwise:
using MirzaCryptoHelpers.Extensions;

string hello = "Hello";
string helloInBin = hello.ToBinary(); // 1001000 1100101 1101100 1101100 1101111
string helloFromBin = helloInBin.FromBinary(); //it'll be converted back to "Hello"
  1. Encrypt string using AES with password:
using MirzaCryptoHelpers.SymmetricCryptos;
using MirzaCryptoHelpers.Common;

string input = "Hello World!";
string password = "P@s$w0rD~!";
byte[] cipherInBytes = new AESCrypto().Encrypt(
    BitHelpers.ConvertStringToBytes(input), password
);  //byte[16] { 6, 186, 118, 13, 202, 18, 116, 245, 127, 199, 186, 125, 9, 117, 187, 9 }
string cipherInBase64 =  BitHelpers.ConvertToBase64String(cipherInBytes); //Brp2DcoSdPV/x7p9CXW7CQ==

string plain = BitHelpers.ConvertBytesToString(
	new AESCrypto().Decrypt(
    		BitHelpers.ConvertFromBase64String(cipherInBase64), password
        )
   ); //Hello World!

And many other helpers available. Ready? Take a look our wiki

Best Regards,

Mirza Ghulam Rasyid.
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
2.3.0 37,747 11/9/2017
2.0.0 2,350 10/6/2017