Skip to content

bronsk1y/Kaz.Operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OperationsIconNoBg

Kaz.Operations

A utility library for .NET Framework 4.7.2 — string manipulation, numerics, collections,
cryptography, date/time, file I/O, system info, and certificate utilities, all in one package.

NuGet Version NuGet Downloads .NET Framework Language

Latest Release Release Date GitHub Downloads Commits since release


⚡ Installation

dotnet add package Kaz.Operations
Install-Package Kaz.Operations

📦 What's Inside

Namespace Description
Kaz.Operations.Text String editing, format validation (email, URL, IP, regex…)
Kaz.Operations.Numerics Safe type conversion, clamp, lerp, factorial, prime check
Kaz.Operations.Collections Merge/counting sort, linear/binary/interpolation search
Kaz.Operations.Time Weekend/weekday checks, past/present/future, date validation
Kaz.Operations.IO File CRUD, encoding control, directory validation
Kaz.Operations.Security.Cryptography SHA-256/512, MD5, HMAC, PBKDF2 hashing
Kaz.Operations.System Machine info, environment variables, system directories
Kaz.Operations.Security.Certificates Load, validate, and inspect X.509 certificates

🔎 Usage

Text
"abc".Reverse();                              // "cba"
"example@gmail.com".IsEmail();                // true
"https://example.com".IsUrl(UrlScheme.Https); // true
Numerics
"19.99".ToNumericOrDefault<double>(0.0); // 19.99
10.Clamp(0, 5);                          // 5
7.IsPrime();                             // true
Collections
var list = new List<int> { 5, 3, 8, 1 };
list.MergeSort();      // [1, 3, 5, 8]
list.BinarySearch(3);  // index 1
Cryptography
string hash   = Sha256.Hash("hello world");
bool   match  = Sha256.Compare("hello world", hash); // true

byte[] salt   = Pbkdf2.GenerateSalt();
string pwHash = Pbkdf2.HMACSHA256("my-password", salt, 10000);
Time
new DateTime(2025, 1, 4).IsWeekend();     // true (Saturday)
DateTime.UtcNow.AddDays(-1).IsPastDate(); // true
"2025-01-01".IsValidDate();               // true
IO
CRUD.AppendLine("logs/app.log", "Started");
List<string> lines = CRUD.ReadAllLines("data/file.txt", skipEmpty: true);
Validation.EnsureExists("logs/archive"); // creates directory if missing
System
bool   isAdmin = SystemInfo.IsAdministrator;
double mb      = SystemInfo.WorkingSetMb;
string path    = EnvironmentVariables.GetVariable("PATH", "default");
Certificates
var      cert    = X509CertificateInfo.LoadCertificate("mycert.pfx", "password");
bool     trusted = cert.IsTrusted();
DateTime exp     = cert.GetExpirationDate();

📄 License

  • This project is distributed under the MIT License — free for personal and commercial use.

🔗 Contact

  • If you want to contact me about the NuGet package, collaboration, or any development‑related questions, feel free to reach out through the links below:

NuGet

About

Provides string manipulation, numeric conversion, collection algorithms, cryptographic hashing, date/time validation, file I/O, system environment access, and certificate utilities for .NET Framework 4.7.2.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages