★ wanayoo — archive 1999 https://github.com/cgreenza/ByteToolsNouvelle recherche | Portail wanayoo
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

README.md

ByteTools

A .Net library to convert between byte arrays and strings using hex (base 16) encoding i.e. each byte is represented by 2 hex characters.

The implementation makes use of an efficient table lookup that is approx 16x faster than using System.BitConverter:

System.BitConverter.ToString(x).Replace("-", "")

Examples in C#

To convert from hex string to byte array:

var b = HexEncoding.GetBytes("2FA5"); // returns new byte [] { 0x2f, 0xa5 }

To convert from byte array to hex string:

var s = HexEncoding.GetString(new byte[] { 0x2f, 0xa5 }); // returns "2FA5"

NuGet Package

Available from NuGet: https://www.nuget.org/packages/ByteTools

Build & Test Status

Build Status

About

A library to convert between byte arrays and strings using hex (base 16) encoding

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.