https://github.com/jasondrawdy/compendio
Collection of common and noteworthy extension methods, security tools, and filesystem functions generally found in most applications; focusing on extensibility and portability.
https://github.com/jasondrawdy/compendio
compendium converters cryptography data extensions generators hashing library security utilities validation windows
Last synced: 3 months ago
JSON representation
Collection of common and noteworthy extension methods, security tools, and filesystem functions generally found in most applications; focusing on extensibility and portability.
- Host: GitHub
- URL: https://github.com/jasondrawdy/compendio
- Owner: jasondrawdy
- License: other
- Created: 2018-07-23T04:40:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T21:11:39.000Z (over 5 years ago)
- Last Synced: 2025-01-27T13:48:13.491Z (8 months ago)
- Topics: compendium, converters, cryptography, data, extensions, generators, hashing, library, security, utilities, validation, windows
- Language: C#
- Homepage:
- Size: 95.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![]()
# Compendio
![]()
![]()
![]()
Compendio is a collection of common and noteworthy extension methods, security tools, and filesystem functions generally found in most applications; focusing on extensibility and portability while also keeping code and documentation easy to follow and clear to understand. Most tools found in the library are usually written everytime a developer/team creates a new project which then becomes a repetitive task, and so, this is where Compendio comes in. Being a portable library a developer can reference the library, or copy the source code directly into their project, providing them with more time to focus on business logic and or the core code of their main application.
---
**Note:** *Compendio uses libraries that contain "unsafe" code and therefore the `Allow unsafe code` build option must be selected in order to actually build the project. However, this shouldn't be a problem considering that the option has already enabled in the project solution prior to pushing to Github.*
---
### Requirements
- .NET Framework 4.6.1# Features
Compendio comes with a notable amount of tools which range from common extensions which transform strings all the way to methods used to manipulate the local filesystem either in a managed or native way. There are extensions that exist for nearly every common C# type as well as tools for security and constants for certain fields of study such as Mathematics, Physics, and Chemistry. The currently available features are the following:### Common Tools
- **Constants**
- Mathematics
- Physics
- Chemistry### Data Utilities
- **IO**
- Directories
- *Manage files and folders using managed and native APIs*
- *Explore long paths otherwise restricted by the 260 character path length limit*
- Files
- *Static and constructed reading, writing, and appending of files using a `FileManager` object*
- *A large list of common `MimeTypes` in a single dictionary*
- *Create files with a path name longer than the typically restrictive 260 character path length limit*
- **Security**
- `SecureRandom` — a cryptographically strong random object utilizing a `RNGCryptoServiceProvider`
- Generators
- *Create files of a specified size containing cryptographically strong data*
- *Generate crypto strong passwords of any length, type, and with or without non-alphanumerics*
- Cryptography
- *Encrypt and decrypt files both synchronously and asynchronously*
- *Encrypt and decrypt strings both synchronously and asynchronously*
- *Encrypt and decrypt data both synchronously and asynchronously*
- Hashing
- *Generate checksums of files, strings, and byte data*
- ***MD5***
- ***RIPEMD150***
- ***SHA1***
- ***SHA256***
- ***SHA384***
- ***SHA512***### Extensions
- **Collections**
- Search, sort, and merge collections of varying types
- **Transformations**
- Int
- *Convert most common types to an `int`*
- Double
- *Round a double precision number using the provided precision and `MidpointRounding` object*
- Byte
- *Convert an `int` or `string` to a byte array*
- *Convert a Base64 encoded `string` into a byte array filled with its decoded equivalent*
- *Convert a `byte[]` into a byte array filled with its Base64 encoded equivalent*
- *Encrypt an array of bytes*
- *Decrypt an array of bytes*
- *Merge two byte arrays into a single array*
- String
- *Obtain the UTF8 encoded `string` equivalent of a byte array*
- *Obtain the Base64 encoded `string` equivalent of a byte array*
- *Convert a `long` into a file size represented as a `string`*
- *Split a `string` into an `IEnumerable`*
- *Create a `List` from a `string`*
- *Reverse a `string`*
- *Encrypt a `string` using AES256 in CBC mode*
- *Decrypt a `string` using AES256 in CBC mode*
- *Convert a `string` into its Base64 equivalent*
- *Convert a Base64 encoded `string` into its plaintext equivalent*
- Color
- *Convert an RGB color from a string into its `Color` object equivalent*
- XElement
- *Extract an `XElement` from an XML file given the element name*
- *Obtain a value from a specified `XElement` without throwing an exception*
- Data
- *Serialize and deserialize any object into an array of bytes that has the `[Serializable]` property*
- Formatters
- *Contains an interface to convert a file size of `long` into its shorthand `string` representation*
- **Validation**
- Check if a `string` is a valid email address in context of modern email addresses# Credits
**Icon:** `Prosymbols`
https://www.flaticon.com/authors/prosymbols**Encryption:** `sdrapkin`
https://github.com/sdrapkin/SecurityDriven.Inferno**Long Paths:** `peteraritchie`
https://github.com/peteraritchie/LongPath# License
Copyright © ∞ Jason DrawdyAll rights reserved.
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.Except as contained in this notice, the name of the above copyright holder
shall not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization.