License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
methods to manipulate raw memory representation
Synopsis
- memCreateTemporary :: Int -> (Ptr Word8 -> IO a) -> IO a
- memXor :: Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> Int -> IO ()
- memXorWith :: Ptr Word8 -> Word8 -> Ptr Word8 -> Int -> IO ()
- memCopy :: Ptr Word8 -> Ptr Word8 -> Int -> IO ()
- memSet :: Ptr Word8 -> Word8 -> Int -> IO ()
- memReverse :: Ptr Word8 -> Ptr Word8 -> Int -> IO ()
- memEqual :: Ptr Word8 -> Ptr Word8 -> Int -> IO Bool
- memConstEqual :: Ptr Word8 -> Ptr Word8 -> Int -> IO Bool
- memCompare :: Ptr Word8 -> Ptr Word8 -> Int -> IO Ordering
Documentation
memXor :: Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> Int -> IO () #
xor bytes from source1 and source2 to destination
d = s1 xor s2
s1, nor s2 are modified unless d point to s1 or s2
memXorWith :: Ptr Word8 -> Word8 -> Ptr Word8 -> Int -> IO () #
xor bytes from source with a specific value to destination
d = replicate (sizeof s) v xor
s
memReverse :: Ptr Word8 -> Ptr Word8 -> Int -> IO () #
Reverse a set number of bytes from src
to dst
. Memory
locations should not overlap.