1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-07 18:06:29 +02:00
Commit Graph

73 Commits

Author SHA1 Message Date
Jack O'Connor 1f529a841c add an example of parsing a Hash from a hex string
Suggested by @zaynetro:
https://github.com/BLAKE3-team/BLAKE3/pull/24#issuecomment-594369061
2020-03-05 10:54:22 -05:00
Jack O'Connor c197a773ac version 0.2.2
Changes since 0.2.1 (and since c-0.2.0):
- Fix a performance issue when the caller makes multiple calls to
  update() with uneven lengths. (#69, reported by @willbryant.)
2020-02-25 12:15:27 -05:00
Jack O'Connor 865d201722 version 0.2.1
Changes since 0.2.0:
- Workarounds in the assembly implementations (enabled by the "c"
  feature), to build with older compilers.
2020-02-14 11:20:03 -05:00
Jack O'Connor afdaf3036b version 0.2.0
Changes since 0.1.5:
- The `c_avx512` feature has been replaced by the `c` feature. In
  addition to providing AVX-512 support, `c` also provides optimized
  assembly implementations. These assembly implementations perform
  better, perform more consistently across compilers, and compile more
  quickly. As before, `c` is off by default, but the `b3sum` binary
  crate activates it by default.
- The `rayon` feature no longer affects the entire API. Instead, it
  provides the `join::RayonJoin` type for use with
  `Hasher::update_with_join`, so that the caller can control when
  multi-threading happens. Standalone API functions like `hash` are
  always single-threaded now.
2020-02-12 14:57:57 -05:00
Jack O'Connor efbfa0463c integrate assembly implementations into the blake3 crate 2020-02-12 10:23:17 -05:00
Jack O'Connor fc219f4f8d Hasher::update_with_join
This is a new interface that allows the caller to provide a
multi-threading implementation. It's defined in terms of a new `Join`
trait, for which we provide two implementations, `SerialJoin` and
`RayonJoin`. This lets the caller control when multi-threading is used,
rather than the previous all-or-nothing design of the "rayon" feature.

Although existing callers should keep working, this is a compatibility
break, because callers who were relying on automatic multi-threading
before will now be single-threaded. Thus the next release of this crate
will need to be version 0.2.

See https://github.com/BLAKE3-team/BLAKE3/issues/25 and
https://github.com/BLAKE3-team/BLAKE3/issues/54.
2020-02-06 15:07:15 -05:00
Jack O'Connor 0de4412884 version 0.1.4
Changes since 0.1.3:
- Hasher supports the reset() method.
- Hasher implements several traits from the `digest` and `crypto_mac`
  crates.
- Bug fixes in the C implementation for MSVC and for 32-bit x86.
2020-02-03 12:05:26 -05:00
Jack O'Connor 9ffe377d45 implement crypto_mac::Mac 2020-02-03 10:18:02 -05:00
Jack O'Connor 9bab77d2cf implement traits from the digest crate 2020-02-02 17:28:22 -05:00
Jack O'Connor e17c45ddd5 version 0.1.3
Changes since 0.1.2:
- All x86 implementations include _mm_prefetch optimizations. These
  improve performance for very large inputs.
- The C implementation performs parallel parent hashing, matching the
  performance of the single-threaded Rust implementation.
- b3sum supports --no-mmap. Contributed by @cesarb.
2020-01-22 21:35:24 -05:00
Jack O'Connor 14cd5c51c4 version 0.1.2
Changes since 0.1.1:
- b3sum no longer mmaps files smaller than 16 KiB. This improves
  performance for hashing many small files. Contributed by @xzfc.
- b3sum now supports --raw output. Contributed by @phayes.
2020-01-17 13:58:55 -05:00
Jack O'Connor 02250a7b7c version 0.1.1
Changes since 0.1.0:
- Optimizations contributed by @cesarb.
- Fix the build on x86_64-pc-windows-gnu when c_avx512 is enabled.
- Add an explicit error message for compilers that don't support c_avx512.
2020-01-13 14:47:28 -05:00
Cesar Eduardo Barros 4690c5f14e Use fixed-size constant_time_eq
The generic constant_time_eq has several branches on the slice length,
which are not necessary when the slice length is known. However, the
optimizer is not allowed to look into the core of constant_time_eq, so
these branches cannot be elided.

Use instead a fixed-size variant of constant_time_eq, which has no
branches since the length is known.
2020-01-12 17:40:57 -05:00
Brendan Molloy a7e11c7cf7 Update license field in Cargo.toml
Fixes the issue of crates.io not recognising the license, and using the `OR` terminology to describe the dual licensing option.
2020-01-10 09:57:25 -05:00
Jack O'Connor 7f43ed9f47 use the Apache-2.0 license in Cargo.toml
This project is also CC0, but crates.io doesn't seem to understand that
one.
2020-01-09 11:48:09 -05:00
Jack O'Connor 3cf242b651 fill out Cargo.toml files for publication 2020-01-09 10:50:55 -05:00
Jack O'Connor 9bf1020213 make the "c_avx512" feature a no-op on non-x86
This lets us enable it by default in b3sum.
2019-12-12 15:13:04 -05:00
Jack O'Connor 98dd9cbbf1 add ci.yml 2019-12-09 21:20:04 -05:00
Jack O'Connor 78191a676f feature comments in Cargo.toml 2019-12-08 21:56:10 -05:00
Jack O'Connor c7fff32392 add Rust FFI wrappers for AVX-512 and NEON 2019-12-08 21:56:10 -05:00
Jack O'Connor 912ae19bce get rid of the bitflags dependency 2019-12-06 15:32:20 -05:00
Jack O'Connor 47ef3ad01f add struct Hasher 2019-12-06 15:13:27 -05:00
Jack O'Connor 21df6b1103 add portable.rs 2019-12-02 17:30:55 -05:00