3 stable releases
2.0.2 | Nov 29, 2019 |
---|---|
1.0.0 | Oct 12, 2019 |
#1801 in Encoding
21 downloads per month
11KB
236 lines
xorstream
Utility for transforming an input stream to an output stream with a bytewise xor transform applied.
As an installed executable, takes a vector of 4, 5, or 6 bit wide (hex, 32, 64) which then pipes from stdin to stdout.
As a dependency it exposes a Transformer
and a XorIter
or XorStream
. Transformer
takes a vector of bytes and an impl Read
. The Transformer
implements IntoIter
or IntoStream
depending on features = [ "std" ]
or features = [ "stream" ]
.
Installing with x86_64-unknown-linux-musl
(for example) can increase the rate it occurs greatly.
$ cargo install xorstream --features bin --target x86_64-unknown-linux-musl
Example:
$ yes 0 | cargo run --features bin --release --target x86_64-unknown-linux-musl -- -4 714b
This pipes AAAAAAAAAAAAAAAAAAAAA
infinitely to stdout, using std xorstream.
Dependencies
~0–10MB
~113K SLoC