xor

Efficient XOR masking

Version on this page:0.0.1.2@rev:1
LTS Haskell 23.0:0.0.1.3
Stackage Nightly 2024-12-09:0.0.1.3
Latest on Hackage:0.0.1.3

See all snapshots xor appears in

GPL-2.0-or-later licensed by Herbert Valerio Riedel
Maintained by Andreas Abel
This version can be pinned in stack with:xor-0.0.1.2@sha256:f9b4e5e520bc6c3f24e1a4144a8498369ec294e881f7f1209cb6a595db556982,2998

Module documentation for 0.0.1.2

Used by 1 package in lts-21.7(full list with versions):

This package provides efficient implementations of routines for applying bitwise XOR masks to binary data.

The currently supported operations (see Data.XOR API documentation for more details) are applying

  • 8-bit wide XOR masks or

  • 32-bit wide XOR masks

to binary data represented by

  • Strict ByteStrings,

  • Lazy ByteStrings,

  • ShortByteStrings (i.e. ByteArray#s), or

  • CStringLen (i.e. Ptrs).

The performance is comparable to portable ISO C99 implementations but this library is implemented as pure Haskell and is thereby compatible with compile targets such as GHCJS.

Changes

0.0.1.2

Andreas Abel, 2023-07-19

  • Use copyBytes for deprecated memcpy as suggested by bytestring-0.11.5.
  • Tested with GHC 7.4 - 9.6.

0.0.1.1

Andreas Abel, 2022-02-16

  • Allow GHC 9.0 and 9.2.
  • Allow bytestring-0.11 for GHC ≥ 8.
  • Tested with GHC 7.4 - 9.2.

0.0.1

Herbert Valerio Riedel, 2020-05-17

Initial release.