Currently in order to release `hashes v1.0` we need to 1.0 `io` as well. For multiple reasons, many out of our control, the `io` crate may not stabalise any time soon. Instead we can invert the dependency between the two crates. This is an ingenious idea, props to Kixunil for coming up with it. Notes - `io` does not currently re-export the `hashes` crate. - This work highlights that we cannot call `hash_reader` on a siphash. - The `Hmac::hash_reader` uses the default key which may not be obvious. Signed-off-by: Tobin C. Harding <me@tobin.cc> |
||
---|---|---|
.. | ||
scripts | ||
src | ||
Cargo.toml | ||
README.md | ||
memory.x |
README.md
Running
To run the embedded test, first prepare your environment:
sudo ./scripts/install-deps
rustup +nightly target add thumbv7m-none-eabi
Then:
source ./scripts/env.sh && cargo +nightly run --target thumbv7m-none-eabi
Output should be something like:
hash:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad hash_check:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
hash:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad hash_check:ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
Cleanup
After sourcing scripts/env.sh
and before building again using another target
you'll want to unset RUSTFLAGS
otherwise you'll get linker errors.
unset RUSTFLAGS