KhKhDoumi 1.0.4

Various methods for data encryption, hashing, randomizer, data processing, etc.

Install-Package KhKhDoumi -Version 1.0.4
dotnet add package KhKhDoumi --version 1.0.4
<PackageReference Include="KhKhDoumi" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KhKhDoumi --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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

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]

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

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]

Release Notes

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

Dependencies

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 History

Version Downloads Last updated
1.0.4 104 6/23/2020
1.0.3 168 5/25/2020
1.0.1 87 5/25/2020