This repository provides efficient encoding and decoding of data as lowercase hexadecimal and a modified Base32 (base32hex–derived) format. Both the specification and the reference implementation are released into the public domain. See the UNLICENSE file for details.
Encoders produce lowercase output suitable for naming files and cloud storage objects. Decoders accept both lowercase and uppercase input.
Output is deterministic, lowercase, and unpadded.
The custom Base32 alphabet 0123456789abcdefghjkmnpqrstvwxyz omits I, L, O, U letters.
// using Neliva;
string dataHex = DataFormat.ToHex(new byte[] { 1, 2, 3 });
bool isHex = DataFormat.IsHex(dataHex);
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 });
bool isBase32 = DataFormat.IsBase32(dataBase32);
byte[] bytesFromBase32 = DataFormat.FromBase32(dataBase32);
string guidBase32 = DataFormat.ToBase32Guid(Guid.NewGuid());
Guid guidFromBase32 = DataFormat.FromBase32Guid(guidBase32);