Îõ³h& ¯  #© 2019-2020 Herbert Valerio RiedelGPL-2.0-or-later Safe-InferredŒ © 2020 Herbert Valerio RiedelGPL-2.0-or-later TrustworthyÊ ý xorÉApply 32-bit XOR mask (considered as four octets in big-endian order) to .7xor32StrictByteString 0x37fa213d "\x7f\x9f\x4d\x51\x58""Hello" In other words, the 32-bit word  0x37fa213d+ is taken as the infinite series of octets ( [0x37,0xfa,0x21,0x3d]) and -ed with the respective octets from the input .The & laws give rise to the following laws:8xor32StrictByteString m (xor32StrictByteString m x) == xxor32StrictByteString 0 x == xÚxor32StrictByteString m (xor32StrictByteString n x) == xor32StrictByteString (m `xor` n) xÛThis function is semantically equivalent to the (less efficient) implementation shown below Üxor32StrictByteString'ref :: Word32 -> BS.ByteString -> BS.ByteString xor32StrictByteString'ref 0 = id xor32StrictByteString'ref msk0 = snd . BS.mapAccumL go msk0 where go :: Word32 -> Word8 -> (Word32,Word8) go msk b = let b' = fromIntegral (msk' .&. 0xff) `xor` b msk' = rotateL msk 8 in (msk',b')The Î implementation is about 6-7 times faster than the naive implementation above.xorConvenience version of Ä which also returns the rotated XOR-mask useful for chained masking.8xor32StrictByteString' 0x37fa213d "\x7f\x9f\x4d\x51\x58"(0xfa213d37,"Hello")xor Variant of  for masking lazy s.5xor32LazyByteString 0x37fa213d "\x7f\x9f\x4d\x51\x58""Hello"xorÉApply 32-bit XOR mask (considered as four octets in big-endian order) to  . See also .6xor32ShortByteString 0x37fa213d "\x7f\x9f\x4d\x51\x58""Hello"xoršApply 32-bit XOR mask (considered as four octets in big-endian order) to memory region expressed as base-pointer and size. The returned value is the input mask rotated by the word-size remained of the memory region size (useful for chained xor-masking of multiple memory-fragments).xor(Apply 8-bit XOR mask to each octet of a .!xor8StrictByteString 0x20 "Hello""hELLO"ÝThis function is a faster implementation of the semantically equivalent function shown below: ˜xor8StrictByteString'ref :: Word8 -> BS.ByteString -> BS.ByteString xor8StrictByteString'ref 0 = id xor8StrictByteString'ref msk0 = BS.map (xor msk0)xor-Apply 8-bit XOR mask to each octet of a lazy . See also xor(Apply 8-bit XOR mask to each octet of a . See also xoråApply 8-bit XOR mask to each octet of a memory region expressed as start address and length in bytes. See also                 !" #$ %& '" ()*"xor-0.0.1.2-CxB7WnhBi8G4B6fVyA1XxUData.XOR Endiannessxor32StrictByteStringxor32StrictByteString'xor32LazyByteStringxor32ShortByteStringxor32CStringLenxor8StrictByteStringxor8LazyByteStringxor8ShortByteStringxor8CStringLenbaseGHC.WordWord8Word16Word32Word64 GHC.ByteOrder ByteOrder LittleEndian BigEndiantargetByteOrder byteSwap64 byteSwap32 byteSwap16 pokeWord16be pokeWord32be pokeWord64be peekWord16be peekWord32be peekWord64bebytestring-0.11.3.1Data.ByteString.Internal ByteStringGHC.ListcycleGHC.BitsxorData.ByteString.Lazy.InternalData.ByteString.Short.InternalShortByteString