xor -package:base-compat-batteries
Compute n-ary logic exclusive OR operation on
NonEmpty list.
Create a xor of bytes between a and b.
the returns byte array is the size of the smallest input.
Create a xor of bytes between a and b.
the returns byte array is the size of the smallest input.
Logical exclusive disjunction. (infixr 1)
Computes the exclusive-or between a message and a cryptographic random
stream indexed by the
Key and the
Nonce. This renders
the output indistinguishable from random noise so long as the
Nonce is not used more than once.
Note: while this can
be used for encryption and decryption, it is
possible for an
attacker to manipulate the message in transit without
detection. USE AT YOUR OWN RISK.
Apply the exclusive-or (
xor) operator to two boolean streams,
point-wise.
Atomically combine old value with a new one via bitwise xor. Returns
old counter value.
Atomically combine old value with a new one via bitwise xor. Returns
old counter value.
Atomically combine old value with a new one via bitwise xor. Returns
old counter value.
Efficient XOR masking
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.
Monoid under bitwise XOR.
>>> getXor (Xor 0xab <> Xor 0x12) :: Word8
185
XOR (integer only)
rd = rn ⊕ op2