https://github.com/cryptic-wizard/hex-converter
A fast hex converter utility using dictionaries
https://github.com/cryptic-wizard/hex-converter
dotnet dotnet-core gherkin hex hexadecimal nuget specflow
Last synced: about 2 months ago
JSON representation
A fast hex converter utility using dictionaries
- Host: GitHub
- URL: https://github.com/cryptic-wizard/hex-converter
- Owner: cryptic-wizard
- License: mit
- Created: 2021-10-09T15:38:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-31T03:16:18.000Z (almost 4 years ago)
- Last Synced: 2025-05-29T14:38:06.631Z (about 1 year ago)
- Topics: dotnet, dotnet-core, gherkin, hex, hexadecimal, nuget, specflow
- Language: C#
- Homepage: https://www.nuget.org/packages/CrypticWizard.HexConverter
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# hex-converter
[](https://www.nuget.org/packages/CrypticWizard.HexConverter)
## Description
* A hex converter utility using dictionaries
## Tests
[](https://github.com/cryptic-wizard/hex-converter/actions/workflows/dotnet.yml)
[](https://github.com/cryptic-wizard/hex-converter/actions/workflows/dotnetcore.yml)
[](https://github.com/cryptic-wizard/hex-converter/actions/workflows/nuget.yml)
## Usage
### Install Package
```Text
dotnet add package CrypticWizard.HexConverter
```
```xml
```
### Include Package:
```C#
using CrypticWizard.HexConverter;
```
### GetHexString( byte[] )
```C#
byte[] byteArray = { 42, 84, 255, 0 };
string hex = HexConverter.GetHexString(byteArray);
```
```Text
"2A54FF00"
```
### GetHexArray( byte[] )
```C#
byte[] byteArray = { 42, 84, 255, 0 };
string[] hexArray = HexConverter.GetHexArray(byteArray);
```
```Text
{ "2A", "54", "FF", "00" }
```
### GetHexList( byte[] )
```C#
byte[] byteArray = { 42, 84, 255, 0 };
List hexList = HexConverter.GetHexList(byteArray);
```
```Text
{ "2A", "54", "FF", "00" }
```
### GetBytes ( string )
```C#
string hex = { "2A54FF00" };
byte[] bytes = HexConverter.GetBytes(hex);
```
```Text
{ 2A, 54, FF, 00 }
```
### GetBytes ( string[] )
```C#
string[] hexArray = { "2A", "54", "FF", "00" };
byte[] bytes = HexConverter.GetBytes(hexArray);
```
```Text
{ 2A, 54, FF, 00 }
```
### GetBytes ( List\ )
```C#
List hexList = new List { "2A", "54", "FF", "00" };
byte[] bytes = HexConverter.GetBytes(hexList);
```
```Text
{ 2A, 54, FF, 00 }
```
## Features
### Recently Added
v0.2.0
```C#
GetHexString( byte[] ) <-- GetHex( byte[] )
```
v0.1.1
```C#
GetHex( byte[] )
GetHexArray( byte[] )
GetHexList( byte[] )
GetBytes( string )
GetBytes( string[] )
GetBytes( List )
```
### Planned Features
## Tools
* [Visual Studio](https://visualstudio.microsoft.com/vs/)
* [NUnit 3](https://nunit.org/)
* [SpecFlow](https://specflow.org/tools/specflow/)
* [SpecFlow+ LivingDoc](https://specflow.org/tools/living-doc/)
* [Run SpecFlow Tests](https://github.com/marketplace/actions/run-specflow-tests)
## License
* [MIT License](https://github.com/cryptic-wizard/hex-converter/blob/main/LICENSE.md)