hexstring-0.10.0: Fast and safe representation of a hex string

Safe HaskellNone
LanguageHaskell2010

Data.HexString

Synopsis

Documentation

data HexString Source

Represents a Hex string. Guarantees that all characters it contains are valid hex characters.

hexString :: ByteString -> HexString Source

Smart constructor which validates that all the text are actually hexadecimal characters.

toHex :: Binary a => a -> HexString Source

Converts a Binary to a HexString value

fromHex :: Binary a => HexString -> a Source

Converts a HexString to a Binary value

asText :: HexString -> Text Source

Access to a Text representation of the HexString