This repository provides support to efficiently encode and decode data in hex and modified base32hex formats.
Encoder uses lowercase alphabet suitable for naming files and cloud objects. Decoder understands lower and uppercase characters.
The custom base32 utilizes the 0123456789abcdefghjkmnpqrstvwxyz
alphabet that omits the I L O U
letters.
// using Neliva;
string dataHex = DataFormat.ToHex(new byte[] { 1, 2, 3 });
byte[] bytesFromHex = DataFormat.FromHex(dataHex);
string guidHex = DataFormat.ToHexGuid(Guid.NewGuid());
Guid guidFromHex = DataFormat.FromHexGuid(guidHex);
string dataBase32 = DataFormat.ToBase32(new byte[] { 1, 2, 3 });
byte[] bytesFromBase32 = DataFormat.FromBase32(dataBase32);
string guidBase32 = DataFormat.ToBase32Guid(Guid.NewGuid());
Guid guidFromBase32 = DataFormat.FromBase32Guid(guidBase32);