KhKhDoumi 1.0.3

.NET Core 3.0
There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package KhKhDoumi -Version 1.0.3
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.
dotnet add package KhKhDoumi --version 1.0.3
<PackageReference Include="KhKhDoumi" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KhKhDoumi --version 1.0.3
#r "nuget: KhKhDoumi, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install KhKhDoumi as a Cake Addin
#addin nuget:?package=KhKhDoumi&version=1.0.3

// Install KhKhDoumi as a Cake Tool
#tool nuget:?package=KhKhDoumi&version=1.0.3

KhKhDoumi contains helper methods for such tasks as encryption/decryption, hashing, random generator. Supports .Net Core 3.0.

Main Features (initial release):

  • encrypts/decrypts data, using few encryption scheme
  • gets text's hash
  • generates random number of given length
  • generates random password of given length (including or excluding uppercase and lowercase letters, special characters and digits)
  • supports international charset

Usage scenario:

// Creating new object for encryption / decryption var enDec = new EnDec("1eft$@lt", "r!gHt$@!t");

// Encrypting / decrypting data var encrypted = enDec.Encrypt("Hello, world!", EncryptionScheme.AES); var decrypted = enDec.Decrypt(encrypted, EncryptionScheme.AES);

// List for bulk operations var list = new List<string>() { "first text", "second text", "third text" };

// Encrypting / decrypting lists (bulk operations) var encryptedList = enDec.BulkEncrypt(list, EncryptionScheme.AES); var decryptedList = enDec.BulkDecrypt(encryptedList, EncryptionScheme.AES);

// Creating new object for hashing var hash = new Hash("my$@1t");

// Hashing // string GetHash(string text, HashingScheme scheme); var hashedValue = hash.GetHash("Hello, world!", HashingScheme.MD5Monstrous);

// Getting random values // int GetRandom(int length); var randomNum = KhKhRandom.GetRandom(5); // returns random number of length 5 (10000 - 99999)

// Getting simple combination // Length must be in range 0..20 // string GetCombination(int length); var randomComb = KhKhRandom.GetCombination(5); // returns random string of length 5

// Getting combination with settings without formatting // string GetCombination(int length, bool upperCase, bool lowerCase, bool numeric, bool specChars); var randStrWithoutFormatting = KhKhRandom.GetCombination(6, true, true, true, true);

// Getting combination with settings, applying formatting // string GetCombination(int length, bool upperCase, bool lowerCase, bool numeric, bool specChars, string format); var randStrWithFormatting = KhKhRandom.GetCombination(6, true, true, true, true, "nunlsu"); // returns [digit][upper][digit][lower][specChar][upper]

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp3.0 netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
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
1.0.4 1,209 6/23/2020
1.0.3 336 5/25/2020
1.0.1 300 5/25/2020

Initial release containing simple encryption/decryption, hashing and random generator methods