memory-0.16.0: memory and related abstraction stuff
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Data.Memory.Encoding.Base16

Description

Low-level Base16 encoding and decoding.

If you just want to encode or decode some bytes, you probably want to use the Data.ByteArray.Encoding module.

Synopsis

Documentation

showHexadecimal Source #

Arguments

:: (forall a. (Ptr Word8 -> IO a) -> IO a)

a with type of function to hold reference to the object

-> Int

length in bytes

-> String 

Transform a raw memory to an hexadecimal String

user beware, no checks are made

toHexadecimal Source #

Arguments

:: Ptr Word8

destination memory

-> Ptr Word8

source memory

-> Int

number of bytes

-> IO () 

Transform a number of bytes pointed by.src in the hexadecimal binary representation in dst

destination memory need to be of correct size, otherwise it will lead to really bad things.

fromHexadecimal :: Ptr Word8 -> Ptr Word8 -> Int -> IO (Maybe Int) Source #

convert a base16 src in dst.

n need to even