commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
3867a73955c0c35bd3bd066d086c07c5e43a78c8
Artyom Pavlov
2024-06-24T14:22:34
bump hybrid-array from 0.2.0-rc.8 to 0.2.0-rc.9 (#1085)
diff --git a/Cargo.lock b/Cargo.lock index 3318947..25ea685 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,9 +84,9 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hybrid-array" -version = "0.2.0-rc.8" +version = "0.2.0-rc.9" source = "registry+https://github.co...
5
10
10
cb18faa17f304c1a7f41dd542cf7267deecc9200
Artyom Pavlov
2024-06-24T14:05:04
block-buffer: improve safety comments, use `MaybeUninit` for internal buffer (#1081) Marks private `unchecked` methods as `unsafe` and documents their safety requirements. Adds `SAFETY` comment for all `unsafe` uses. Use of `copy_nonoverlapping` ensures that compiler will not generate unreachable panic branches. Us...
diff --git a/block-buffer/src/lib.rs b/block-buffer/src/lib.rs index ad9a900..c199062 100644 --- a/block-buffer/src/lib.rs +++ b/block-buffer/src/lib.rs @@ -12,7 +12,7 @@ use array::{ typenum::{Add1, B1}, Array, ArraySize, }; -use core::{fmt, ops::Add, slice}; +use core::{fmt, mem::MaybeUninit, ops::Add, ptr...
3
141
70
ba7ede17d715ee65bf1dfe211ba8ff48855064fd
Artyom Pavlov
2024-06-19T22:01:51
Update Cargo.lock (#1083)
diff --git a/Cargo.lock b/Cargo.lock index 3826964..3318947 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,7 +15,7 @@ version = "0.11.0-pre.5" dependencies = [ "crypto-common", "hex-literal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.7.0", + "zeroize 1.8.1 (registry+https://github...
3
45
45
c68a5204b2e66b0f60832d845e048fca96a81211
Artyom Pavlov
2024-06-19T14:18:28
Fix Nightly warnings (#1080)
diff --git a/blobby/src/lib.rs b/blobby/src/lib.rs index 665b8b2..1157580 100644 --- a/blobby/src/lib.rs +++ b/blobby/src/lib.rs @@ -151,10 +151,10 @@ fn encode_vlq(mut val: usize, buf: &mut [u8; 4]) -> &[u8] { /// - (J << 1) & 0x01: indicates this blob is index entry J /// - (L << 1) & 0x00: indicate...
6
49
46
b15cc6c1cddad1558d44b138ff869b0590d2ac55
Luca Bruno
2024-06-11T14:05:57
cargo: point `repository` metadata to clonable URLs (#1079) This tweaks the `repository` fields in Cargo metadata in order to use the correct (i.e. git clonable) URL. The existing GitHub webUI URLs for each package have been retained and moved to `homepage` fields.
diff --git a/cmov/Cargo.toml b/cmov/Cargo.toml index 7d6d501..67fe6d8 100644 --- a/cmov/Cargo.toml +++ b/cmov/Cargo.toml @@ -9,7 +9,8 @@ and CSEL on AArch64. version = "0.3.1" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" -repository = "https://github.com/RustCrypto/utils/tree/master/cmov" +homep...
2
4
2
3db6690f7be82e90a92e457d5becfd754fd10299
Tony Arcieri
2024-05-25T19:17:46
zeroize: fix `homepage`/`repository` in Cargo.toml (#1076) Also fixes it for `zeroize_derive`. Now: - `repository` points to a valid git repository: the `utils` repo - `homepage` points to the GitHub URL for the crate's subdirectory
diff --git a/zeroize/Cargo.toml b/zeroize/Cargo.toml index 008ef55..0bd7b4d 100644 --- a/zeroize/Cargo.toml +++ b/zeroize/Cargo.toml @@ -10,7 +10,8 @@ even WASM! """ authors = ["The RustCrypto Project Developers"] license = "Apache-2.0 OR MIT" -repository = "https://github.com/RustCrypto/utils/tree/master/zeroize" +...
2
5
3
a7eddc620ed683216b97d924deeab7ea4f84a5af
Tony Arcieri
2024-05-25T17:56:10
zeroize: fix unnecessary qualifications (#1072)
diff --git a/zeroize/derive/src/lib.rs b/zeroize/derive/src/lib.rs index 2f31fc6..9bbc1ca 100644 --- a/zeroize/derive/src/lib.rs +++ b/zeroize/derive/src/lib.rs @@ -176,7 +176,7 @@ impl ZeroizeAttrs { } match &input.data { - syn::Data::Enum(enum_) => { + Data::Enum(enum_) => { ...
2
8
3
c0eab7f7abfc244e9fcd482520542329da31f87c
Tony Arcieri
2024-04-24T14:31:28
cpufeatures: fix macOS build (#1066) The "sm4" token wasn't being handled. To fix the bleeding, this adds it but hardcoded to disabled. See build failure here: https://github.com/RustCrypto/utils/actions/runs/8818083683/job/24206057206?pr=1065
diff --git a/cpufeatures/src/aarch64.rs b/cpufeatures/src/aarch64.rs index 2305d89..4248a75 100644 --- a/cpufeatures/src/aarch64.rs +++ b/cpufeatures/src/aarch64.rs @@ -117,6 +117,9 @@ macro_rules! check { && $crate::aarch64::sysctlbyname(b"hw.optional.armv8_2_sha3\0") } }; + ("sm4") =...
1
3
0
6d383a554b76df2c6796d8d2982a6a8535342617
Tony Arcieri
2024-04-24T14:07:18
zeroize: always enable AArch64 support (#1064) Now that our MSRV is high enough we don't need to feature-gate `aarch64` support anymore, and instead it can be always-on when compiling for `aarch64` targets. The `aarch64` feature is retained as a noop since removing it would be a breaking change.
diff --git a/zeroize/Cargo.toml b/zeroize/Cargo.toml index f864e4f..158cebc 100644 --- a/zeroize/Cargo.toml +++ b/zeroize/Cargo.toml @@ -23,11 +23,12 @@ zeroize_derive = { version = "1.3", path = "derive", optional = true } [features] default = ["alloc"] -aarch64 = [] alloc = [] -derive = ["zeroize_derive"] std =...
2
4
3
24decb93793936110ae564b6c8e475d91f4e4e44
Tony Arcieri
2024-04-24T13:56:17
zeroize: use `doc_auto_cfg` (#1063) Replaces manual `doc_cfg` annotations with automatic ones powered by `doc_auto_cfg`.
diff --git a/zeroize/src/aarch64.rs b/zeroize/src/aarch64.rs index 07744d0..e9e1565 100644 --- a/zeroize/src/aarch64.rs +++ b/zeroize/src/aarch64.rs @@ -1,7 +1,4 @@ //! [`Zeroize`] impls for ARM64 SIMD registers. -//! -//! Gated behind the `aarch64` feature: MSRV 1.59 -//! (the overall crate is MSRV 1.60) use crate...
3
1
14
ce47b3c74f46217995192d092c4d2dd3bc954986
Brent Lewis
2024-03-13T20:57:08
fiat-constify: filter out `let mut` declarations (#1057) Avoids unused variable warnings
diff --git a/fiat-constify/src/main.rs b/fiat-constify/src/main.rs index d65fadb..8f9c36d 100644 --- a/fiat-constify/src/main.rs +++ b/fiat-constify/src/main.rs @@ -199,6 +199,21 @@ fn rewrite_fn_body(stmts: &[Stmt], outputs: &Outputs) -> Vec<Stmt> { } } else if let Stmt::Expr(Expr::Call(expr), So...
1
15
0
878bcfd0a1e02a172c51654a718eb4f504b11e2b
Artyom Pavlov
2024-03-01T12:39:30
Fix Nightly warnings (#1055)
diff --git a/blobby/src/lib.rs b/blobby/src/lib.rs index b7d1737..665b8b2 100644 --- a/blobby/src/lib.rs +++ b/blobby/src/lib.rs @@ -51,7 +51,6 @@ extern crate alloc; use alloc::{boxed::Box, collections::BTreeMap, vec, vec::Vec}; -use core::iter::Iterator; /// Iterator over binary blobs pub struct BlobIterator<...
4
25
36
69185958dfb899be7a17e5a6d2d21063558ca3a1
sinu.eth
2024-03-01T11:26:34
opaque-debug: support generics (#1053)
diff --git a/opaque-debug/src/lib.rs b/opaque-debug/src/lib.rs index 3b48b07..62f84a4 100644 --- a/opaque-debug/src/lib.rs +++ b/opaque-debug/src/lib.rs @@ -8,6 +8,17 @@ #[doc(hidden)] pub extern crate core as __core; +#[macro_export] +#[doc(hidden)] +macro_rules! format_params { + ($single:ident) => { + ...
2
67
0
ff785c9946d222e9bd8b238b2fe0d60e2959ad74
Tony Arcieri
2024-02-01T17:21:40
block-buffer: bump `crypto-common` to v0.2.0-pre.5 (#1050) Also cuts a `block-buffer` v0.11.0-pre.5 prerelease
diff --git a/Cargo.lock b/Cargo.lock index bafbf6f..07843f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.11.0-pre.4" +version = "0.11.0-pre.5" dependencies = [ "crypto-common", "hex-literal 0.4.1 (registry+https://github.com/rust-la...
2
5
5
f5df3cfddd136b5de1fbdf0d9a5c8d75e2a028a0
Noah Stiltner
2024-01-31T23:06:13
zeroize: add unsafe `zeroize_flat_type` function (#1045)
diff --git a/zeroize/src/lib.rs b/zeroize/src/lib.rs index b67b5c9..9326d07 100644 --- a/zeroize/src/lib.rs +++ b/zeroize/src/lib.rs @@ -795,6 +795,74 @@ unsafe fn volatile_set<T: Copy + Sized>(dst: *mut T, src: T, count: usize) { } } +/// Zeroizes a flat type/struct. Only zeroizes the values that it owns, and ...
1
68
0
c99ca4881865ab4baa2a61f16ce69d61c100707d
Tony Arcieri
2024-01-10T17:14:47
Bump `crypto-common` and `hybrid-array` (#1041) Bumps the following dependencies: - `crypto-common` => v0.2.0-pre.4 - `hybrid-array` => v0.2.0-rc.0 Also prepares the following releases: - `block-buffer` v0.11.0-pre.4 - `block-padding` v0.4.0-pre.4 - `dbl` v0.4.0-pre.4 - `inout` v0.2.0-pre.4
diff --git a/Cargo.lock b/Cargo.lock index 1a2dd38..5d5bb5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.11.0-pre.3" +version = "0.11.0-pre.4" dependencies = [ "crypto-common", "hex-literal 0.4.1 (registry+https://github.com/rust-la...
5
23
23
efb5f8518ad33027b4299759d7639a1fa9aeef18
Tony Arcieri
2024-01-10T16:42:49
hybrid-array v0.2.0-rc.0 (#1040)
diff --git a/Cargo.lock b/Cargo.lock index 0263944..1a2dd38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ dependencies = [ name = "block-padding" version = "0.4.0-pre.3" dependencies = [ - "hybrid-array 0.2.0-pre.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hybrid-array 0.2.0-pre.8", ...
2
9
9
62ec49c0d803e7748f0b2c1debd22d9de3722e83
Tony Arcieri
2024-01-10T16:27:29
hybrid-array: add `FromIterator` impl (#1039) For feature parity with `GenericArray`. It would be nice to have a fallible version of this which returns an error instead of panicking on length mismatch, but we'd first need to add `FromFn::try_from_fn` or thereabouts. This is enough to cover the immediate use ca...
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index ae14a80..4eeb183 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -421,6 +421,25 @@ where } } +impl<T, U> FromIterator<T> for Array<T, U> +where + U: ArraySize, +{ + fn from_iter<I: IntoIterator<Item = T>>(iter: I) -...
2
38
1
cdc6acde10aa02016d79d26d0dc97faa80ecf4a6
Artyom Pavlov
2024-01-10T16:07:07
hybrid-array: add slice cast methods to ArrayOps (#1038)
diff --git a/Cargo.lock b/Cargo.lock index 0338867..0263944 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,9 +115,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.152" source = "registry+https://github.com/rust-lang/...
3
80
8
4766588feb4f5192a86aefd679ee18bdc696c146
Tony Arcieri
2024-01-10T04:05:31
hybrid-array: remove `Array::ref_*` prefixes (#1037) Use the same names `GenericArray` did: - `Array::from_slice` - `Array::from_mut_slice` The goal is to deprecate these methods anyway, so we should use the same names as `GenericArray` to ease migrating off of it.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 9f98dc6..d94ab7c 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -102,7 +102,7 @@ where // TODO(tarcieri): deprecate this before the v0.2 release // #[deprecated(since = "0.2.0", note = "use TryFrom instead")] #[in...
1
2
2
481df9d5c0e3297b31d82b6666143f065ec3cea1
Darin Morrison
2024-01-04T20:12:52
cpufeatures: support more AVX512-related features (#1035) This PR adds support for the following features for x86_64: `GFNI` `VAES` `VPCLMULQDQ` `AVX512_BITALG` `AVX512_VPOPCNTDQ`
diff --git a/cpufeatures/src/x86.rs b/cpufeatures/src/x86.rs index 958eff3..07e3a9c 100644 --- a/cpufeatures/src/x86.rs +++ b/cpufeatures/src/x86.rs @@ -144,4 +144,9 @@ __expand_check_macro! { ("avx512vl", "zmm", 1, ebx, 31), ("avx512vbmi", "zmm", 1, ecx, 1), ("avx512vbmi2", "zmm", 1, ecx, 6), + ("gfn...
1
5
0
55a93f1163153b494b7c78d3a2fe2a8da5c48121
Tony Arcieri
2023-12-31T19:58:44
hybrid-array: expand sizes (#1032) The number of sizes we define is a compile time vs utility tradeoff. We're hitting real world need for some of these additional sizes in the `RustCrypto/hashes` repo. This expands the available sizes to cover these use cases, and potential additional ones.
diff --git a/hybrid-array/src/sizes.rs b/hybrid-array/src/sizes.rs index e9398c6..af48cb0 100644 --- a/hybrid-array/src/sizes.rs +++ b/hybrid-array/src/sizes.rs @@ -121,10 +121,204 @@ impl_array_size! { 62 => U62, 63 => U63, 64 => U64, + 65 => U65, + 66 => U66, + 67 => U67, + 68 => U68, + ...
1
194
0
37c156057b190a1ad75bb3cc47c29e051a991b87
Tony Arcieri
2023-12-31T19:38:50
hybrid-array: re-add `AsRef<[T; N]>`/`AsMut<[T; N]>` impls (#1031) These were removed in #1026 for more consistency with core arrays. However, `generic-array` provides these impls, which makes removing them problematic when migrating `generic-array`-based code, so it's easier to keep them around, even if it break...
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index dc031bf..9f98dc6 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -212,6 +212,17 @@ where } } +impl<T, U, const N: usize> AsRef<[T; N]> for Array<T, U> +where + Self: ArrayOps<T, N>, + U: ArraySize, +{ + #[inline]...
1
22
0
c37259ca15ef4ba86897f83d371c0bdb22991360
Tony Arcieri
2023-12-31T04:38:16
Release *-pre.2 prereleases (#1030) Cuts the following prereleases, which include a bump to `hybrid-array` v0.2.0-pre.7: - `block-buffer` v0.11.0-pre.2 - `block-padding` v0.4.0-pre.2 - `dbl` v0.4.0-pre.2 - `inout` v0.2.0-pre.2
diff --git a/Cargo.lock b/Cargo.lock index 43c3411..6aec916 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.11.0-pre.1" +version = "0.11.0-pre.2" dependencies = [ "crypto-common", "hex-literal 0.4.1 (registry+https://github.com/rust-la...
5
9
9
bbed36e4639bbf880d4d9a2f81e89ca7379efd8e
Tony Arcieri
2023-12-31T04:25:33
Bump `crypto-common` to v0.2.0-pre.2 (#1029)
diff --git a/Cargo.lock b/Cargo.lock index ba277d5..43c3411 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,8 +42,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.2.0-pre.1" -source = "git+https://github.com/RustCrypto/traits.git?branch=hybrid-array/v0.2.0-pre.7#d9db948f96cb4d182b82eb003a92060...
3
4
7
5144cec5a1bbe34616d6c08a7775088fa56cace5
Tony Arcieri
2023-12-31T03:54:12
Bump `hybrid-array` depenency to v0.2.0-pre.7 (#1028) Due to a cyclical dependency with `crypto-common` this has to be done as part of a 2-part process and can't be done at release-time.
diff --git a/Cargo.lock b/Cargo.lock index ce6dd4b..ba277d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ dependencies = [ name = "block-padding" version = "0.4.0-pre.1" dependencies = [ - "hybrid-array 0.2.0-pre.6", + "hybrid-array 0.2.0-pre.7 (registry+https://github.com/rust-lang/crates.io-index)", ...
5
16
13
e688baef9662c6cfcd4e1d61f3c4cf3074385d07
Tony Arcieri
2023-12-31T03:38:26
hybrid-array v0.2.0-pre.7 (#1027)
diff --git a/Cargo.lock b/Cargo.lock index fe2fcf9..ce6dd4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ dependencies = [ name = "block-padding" version = "0.4.0-pre.1" dependencies = [ - "hybrid-array 0.2.0-pre.6 (registry+https://github.com/rust-lang/crates.io-index)", + "hybrid-array 0.2.0-pre.6", ...
2
9
9
404a67ebaf07f5d9856d6b89dc589f58f44e3cfe
Tony Arcieri
2023-12-31T03:28:19
hybrid-array: use `From` for `Array`<->`[T; N]` reference conversions (#1026) ...instead of `AsRef`/`AsMut`, which allows inference to work for those traits. Notably `[T; N]` doesn't impl `AsRef`/`AsMut` for itself, only for slices, so this is more consistent.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 39dd2f4..dc031bf 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -212,17 +212,6 @@ where } } -impl<T, U, const N: usize> AsRef<[T; N]> for Array<T, U> -where - Self: ArrayOps<T, N>, - U: ArraySize, -{ - #[inline]...
1
22
22
b45f35f3e840a51604f9b1c3c58f7dae09a54742
Tony Arcieri
2023-12-31T03:08:41
hybrid-array: add `PartialEq` impls for core array (#1025) Simplified comparisons with core arrays
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 6b6132c..39dd2f4 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -482,6 +482,26 @@ where } } +impl<T, U, const N: usize> PartialEq<[T; N]> for Array<T, U> +where + T: PartialEq, + U: ArraySize<ArrayType<T> = [T; N]>...
1
20
0
2bdcea119855e9bd9852afcd58678637ff7ca897
Tony Arcieri
2023-12-31T02:57:38
Revert "hybrid-array: get rid of `check_slice_length` (#1020)" (#1024) This reverts commit 49e9d6869c8333522ef598c11c6f048f9475ec6c. The extra bounds turn out to be rather problematic with e.g. `crypto-common`, so revert this even though `check_slice_length` is a hack.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 5ed07ab..6b6132c 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -102,10 +102,7 @@ where // TODO(tarcieri): deprecate this before the v0.2 release // #[deprecated(since = "0.2.0", note = "use TryFrom instead")] #[i...
1
31
23
32a4aa5f474009a27683598d120368b10ffbfdbe
Tony Arcieri
2023-12-31T02:51:08
hybrid-array: reorder impls (#1023)
diff --git a/hybrid-array/src/sizes.rs b/hybrid-array/src/sizes.rs index efc215e..e9398c6 100644 --- a/hybrid-array/src/sizes.rs +++ b/hybrid-array/src/sizes.rs @@ -5,6 +5,14 @@ use super::{Array, ArrayOps, ArraySize, AssociatedArraySize}; macro_rules! impl_array_size { ($($len:expr => $ty:ident),+) => { ...
1
8
8
e8ed11476c56658530c17f6585c9613376a5ac40
Tony Arcieri
2023-12-31T02:39:12
hybrid-array: add `Borrow(Mut)` bounds to `SliceOps` (#1022)
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index a912e92..5ed07ab 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -250,6 +250,16 @@ where } } +impl<T, U> Borrow<[T]> for Array<T, U> +where + U: ArraySize, +{ + #[inline] + fn borrow(&self) -> &[T] { + sel...
1
22
0
49e9d6869c8333522ef598c11c6f048f9475ec6c
Tony Arcieri
2023-12-31T02:17:37
hybrid-array: get rid of `check_slice_length` (#1020) It was a hack. Instead, leverages the `TryFrom` reference conversion to a core array to check the length, then casts from a core array reference.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 94733da..a912e92 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -102,7 +102,10 @@ where // TODO(tarcieri): deprecate this before the v0.2 release // #[deprecated(since = "0.2.0", note = "use TryFrom instead")] #[i...
1
23
31
52e20ca3c9e96daa01bce4dc6bddebc8fda384b3
Tony Arcieri
2023-12-31T01:54:47
hybrid-array: use `Clone` bound for `TryFrom<&[T; N]>` (#1019) Applicable to more use cases
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 291d7ee..94733da 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -130,7 +130,7 @@ where where Self: Clone, { - Self::ref_from_slice(slice).clone() + slice.try_into().expect("slice length mismatch"...
1
3
3
3e97167d3f5657607bdd9ab8582c8ffe908d99d8
Tony Arcieri
2023-12-31T01:46:13
hybrid-array: remove `Array::from_slice` (#1018) It duplicates `TryFrom`
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index e8f2fd6..291d7ee 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -70,16 +70,6 @@ where Self(FromFn::from_fn(cb)) } - /// Create array from a slice. - // TODO(tarcieri): deprecate this before the v0.2 release...
1
0
10
14e75ca51c4cc203244b8a3d07966d2b18ed7770
Tony Arcieri
2023-12-31T01:34:46
hybrid-array: add `ArrayN` type alias (#1017) Adds a type alias for `Array` which uses const generics instead of `typenum`.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 750389f..e8f2fd6 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -44,6 +44,9 @@ use typenum::{Diff, Sum, Unsigned}; #[cfg(feature = "zeroize")] use zeroize::{Zeroize, ZeroizeOnDrop}; +/// Type alias for [`Array`] which is con...
2
7
1
35e61ad6d641f859e17f5138f8ca0b3c57f43dcc
Tony Arcieri
2023-12-31T01:33:40
hybrid-array: use `assert_ne!` in `slice_as_chunks(_mut)` (#1016) Provides more effective debugging in the event the wrong size is used
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 3478f3b..750389f 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -741,7 +741,7 @@ impl<T, const N: usize> FromFn<T> for [T; N] { /// Panics if `N` is 0. #[allow(clippy::arithmetic_side_effects)] pub fn slice_as_chunks<T, N: Ar...
1
2
2
a15a4aad0d3feedb7f71556f53c0611db3de916c
Tony Arcieri
2023-12-31T01:16:55
hybrid-array: simpler `TryFrom` impl (#1015)
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 887ca25..3478f3b 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -72,7 +72,7 @@ where // #[deprecated(since = "0.2.0", note = "use TryFrom instead")] pub fn from_slice(slice: &[T]) -> Result<Self, TryFromSliceError> ...
1
3
4
8a81f1dac5ed5f288193e793d6e4074d0277c5ee
Tony Arcieri
2023-12-31T01:07:38
hybrid-array: rename `impls` module to `sizes` (#1014) It reflects what the module does: defines a macro for defining various array sizes, then invokes it.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 9ede91d..887ca25 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -23,7 +23,7 @@ unused_qualifications )] -mod impls; +mod sizes; pub use typenum; pub use typenum::consts; diff --git a/hybrid-array/src/impls.rs b/hybri...
2
1
1
fdb752700c20b3ce841fed9f8ebf931a163cb221
Tony Arcieri
2023-12-31T01:00:47
hybrid-array: unconditional `ArrayOps`/`AssociatedArraySize` impls (#1013) Makes these traits always impl'd for `[T; N]` and `Array<T, U>` respectively.
diff --git a/hybrid-array/src/impls.rs b/hybrid-array/src/impls.rs index f578b1d..efc215e 100644 --- a/hybrid-array/src/impls.rs +++ b/hybrid-array/src/impls.rs @@ -51,10 +51,6 @@ macro_rules! impl_array_size { impl<T> AssociatedArraySize for [T; $len] { type Size = typenum::$ty; ...
2
9
10
78e7bf71aee566caa22478da98ca37062bbd9876
Tony Arcieri
2023-12-31T00:51:55
hybrid-array: move non-size-related impls to toplevel (#1012)
diff --git a/hybrid-array/src/impls.rs b/hybrid-array/src/impls.rs index 55542ff..f578b1d 100644 --- a/hybrid-array/src/impls.rs +++ b/hybrid-array/src/impls.rs @@ -1,26 +1,6 @@ -use super::{Array, ArrayOps, ArraySize, AssociatedArraySize}; - -#[cfg(feature = "zeroize")] -use zeroize::{Zeroize, ZeroizeOnDrop}; - -#[cfg...
2
65
63
6e3a1eb647cdd945cc47911972498a479674d651
Tony Arcieri
2023-12-31T00:44:29
hybrid-array: simplify `From<Array<T, U>>` impl for `[T; N]` (#1011) If the latter is named specifically as an associated type, then it can simply be moved out of the `Array` newtype.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index a946248..706ae47 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -351,12 +351,11 @@ where impl<T, U, const N: usize> From<Array<T, U>> for [T; N] where Array<T, U>: ArrayOps<T, N>, - U: ArraySize, + U: ArraySize<Arra...
1
2
3
fc5d6143d34ae6c691da147a5a378d8db5d8c943
Tony Arcieri
2023-12-31T00:21:56
Impl `From<Array<T, U>>` for `[T; N]` generically (#1010) Uses a const generic implementation bounded on `ArrayOps<T, N>` rather than using a macro to write a separate one for each array size.
diff --git a/hybrid-array/src/impls.rs b/hybrid-array/src/impls.rs index 76cf70b..55542ff 100644 --- a/hybrid-array/src/impls.rs +++ b/hybrid-array/src/impls.rs @@ -75,12 +75,6 @@ macro_rules! impl_array_size { impl<T> AssociatedArraySize for Array<T, typenum::$ty> { type Size = typenum::$...
2
14
7
5669e29eda415f40d939f44a16d0110084492d4f
Tony Arcieri
2023-12-30T23:45:40
hybrid-array: rename `ArrayExt` to `FromFn` (#1009) Also impls `FromFn` for `Array`. Now that this trait has a single method, it can be renamed to match that single method's functionality. It also changes the implementation to use `core::array::from_fn` now that it's stable.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 417b412..66602ee 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -61,7 +61,7 @@ where where F: FnMut(usize) -> T, { - Self(ArrayExt::from_fn(cb)) + Self(FromFn::from_fn(cb)) } /// Crea...
1
34
27
db9c8624cafe34fb1a1f21a4bb72cb281597f632
Tony Arcieri
2023-12-30T23:32:56
hybrid-array: get rid of `ArrayExt::from_slice` (#1008) It can be composed in terms of other features.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index adeeb96..417b412 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -65,11 +65,13 @@ where } /// Create array from a slice. + // TODO(tarcieri): deprecate this before the v0.2 release + // #[deprecated(since = "0.2...
1
5
15
52dd5b188357cd064bc56d88c8fa5937b6a6833b
Tony Arcieri
2023-12-30T23:25:25
hybrid-array: add `From<Array<T, U>>` bound to `ArraySize` (#1007) Specifically to `ArraySize::ArrayType`
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index d41656e..adeeb96 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -648,7 +648,11 @@ impl<T, const N: usize> ArrayExt<T> for [T; N] { /// It is implemented only for a number of types defined in [`typenum::consts`]. pub unsafe tra...
1
5
1
63ba0eb91a9de123c9bd5a58dab5c802320afe03
Tony Arcieri
2023-12-30T23:05:23
hybrid-array: `AssociatedArraySize` trait (#1006) Adds a type for associating a `typenum`-based size with a given array type, which can be either `[T; N]` or `Array<T, U>`. This subsumes the previous `IntoArray` trait, which can be replaced by a simple `Into` bound instead.
diff --git a/hybrid-array/src/impls.rs b/hybrid-array/src/impls.rs index dfe564f..76cf70b 100644 --- a/hybrid-array/src/impls.rs +++ b/hybrid-array/src/impls.rs @@ -1,4 +1,4 @@ -use super::{Array, ArrayOps, ArraySize, IntoArray}; +use super::{Array, ArrayOps, ArraySize, AssociatedArraySize}; #[cfg(feature = "zeroize...
2
16
25
3d3ee5cabc23e8c92bed71985c880a0751663132
Tony Arcieri
2023-12-30T22:43:25
Add `SliceOps::as_array_chunks(_mut)` (#1005) Adds thunks for the `slice_to_chunks`/`slice_to_chunks_mut` static functions as provided methods of the `SliceOps` trait.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 966e50b..1293a8b 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -585,6 +585,19 @@ pub trait SliceOps<T>: + IndexMut<usize> + IndexMut<Range<usize>> { + /// Splits the shared slice into a slice of `N`-element arrays...
1
13
0
8646acb1c594560401be0f791179a9901b75ca24
Tony Arcieri
2023-12-30T22:34:23
hybrid-array: factor `SliceOps` out from `ArrayOps` (#1004) Factors out a trait which can be impl'd on all three of `[T]`, `[T; N]`, and `Array<T, U>` for operations which don't need a const generic parameter.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index f7da4e5..966e50b 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -536,18 +536,13 @@ fn check_slice_length<T, U: ArraySize>(slice: &[T]) -> Result<(), TryFromSliceEr /// Array operations which are const generic over a given arr...
1
19
9
3a5f07c1324512da5b168720f696b16372bc38e4
Tony Arcieri
2023-12-30T22:00:35
hybrid-array: make `ArrayOps` better resemble core arrays (#1003) ...and asserts as much by impl'ing the trait for core arrays. The main notable change is bounding on `AsRef<[T]>`/`AsMut<[T]>`, which core arrays do impl, however they *don't* actually impl `AsRef<[T; N]>`/`AsMut<[T; N]>`. Those impls are retain...
diff --git a/hybrid-array/src/impls.rs b/hybrid-array/src/impls.rs index bad5640..dfe564f 100644 --- a/hybrid-array/src/impls.rs +++ b/hybrid-array/src/impls.rs @@ -166,3 +166,44 @@ impl_array_size! { 4096 => U4096, 8192 => U8192 } + +impl<T, const N: usize> ArrayOps<T, N> for [T; N] +where + Self: IntoAr...
2
64
2
94bb527b1b5a09e51635ed18e3b67116be51365c
Tony Arcieri
2023-12-30T01:20:56
Bump `crypto-common` to v0.2.0-pre.1 (#998)
diff --git a/Cargo.lock b/Cargo.lock index f22d1a6..55d4379 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,8 +42,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.2.0-pre" -source = "git+https://github.com/RustCrypto/traits?branch=hybrid-array/v0.2.0-pre.6#9161a6997d187f14586c7d19c3fe1ed2fde3c...
3
4
6
314938fe8e16d55979e70d777f90a475abcfb7f4
Tony Arcieri
2023-12-30T00:50:26
Bump `hybrid-array` depenency to v0.2.0-pre.6 (#997) Due to a cyclical dependency with `crypto-common` this has to be done as part of a 2-part process and can't be done at release-time.
diff --git a/Cargo.lock b/Cargo.lock index 20a7ebe..f22d1a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ dependencies = [ name = "block-padding" version = "0.4.0-pre" dependencies = [ - "hybrid-array 0.2.0-pre.5", + "hybrid-array 0.2.0-pre.6 (registry+https://github.com/rust-lang/crates.io-index)", ] ...
5
13
13
8eca1e124934fe78f527c3c865d7295ee7a39ed1
Tony Arcieri
2023-12-30T00:31:33
hybrid-array v0.2.0-pre.6 (#996)
diff --git a/Cargo.lock b/Cargo.lock index 1a7e2e4..20a7ebe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ dependencies = [ name = "block-padding" version = "0.4.0-pre" dependencies = [ - "hybrid-array 0.2.0-pre.5 (registry+https://github.com/rust-lang/crates.io-index)", + "hybrid-array 0.2.0-pre.5", ] ...
2
9
12
1f75c6234bc43f72487033be23ed58030474ef68
Tony Arcieri
2023-12-30T00:18:59
hybrid-array: remove `ByteArray` alias (#995) It's longer than `Array<u8, _>` and provides little value other than needless indirection. Closes #987
diff --git a/Cargo.lock b/Cargo.lock index e16b42a..1a7e2e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,6 +59,7 @@ dependencies = [ name = "fiat-constify" version = "0.0.0" dependencies = [ + "prettyplease", "proc-macro2", "quote", "syn", @@ -121,6 +122,16 @@ checksum = "a08173bc88b7955d1b3145aa561539096c4...
3
25
17
cc772039c62a0a2f4761b28df796d8b2dbda12e6
Arvind Mukund
2023-12-20T15:16:47
fiat-constify: Fix implementation for fiat-crypto >= 0.0.21 (#992) fiat-crypto introduced new types instead of just type aliases, this causes the generated code to no longer compile. This is a breaking change since this will no longer compile code generated by fiat-crypto version < 0.0.21 Signed-off-by: Arvind M...
diff --git a/fiat-constify/Cargo.toml b/fiat-constify/Cargo.toml index 39ce42f..9010210 100644 --- a/fiat-constify/Cargo.toml +++ b/fiat-constify/Cargo.toml @@ -15,6 +15,7 @@ readme = "README.md" edition = "2021" [dependencies] +prettyplease = "0.2.15" proc-macro2 = "1" quote = "1" syn = { version = "2", feature...
4
296
284
f8f6f6e703a62dcbe0cc996c9b77bac2a9e9ad9f
Leonardo Gibrowski Faé
2023-12-09T14:12:46
Fix cmovnz documentation (#991) cmovnz moves when condition is **not** 0.
diff --git a/cmov/src/lib.rs b/cmov/src/lib.rs index 48b682c..7c5e2f4 100644 --- a/cmov/src/lib.rs +++ b/cmov/src/lib.rs @@ -27,7 +27,7 @@ pub trait Cmov { /// /// Uses a `test` instruction to check if the given `condition` value is /// equal to zero, conditionally moves `value` to `self` when `condition...
1
1
1
68d9c391fbbbb5ec90a6a982a5d9f651ec103f7f
Tony Arcieri
2023-11-16T14:53:15
Cargo.toml: set `workspace.resolver = "2"` (#982) Gets rid of this warning: warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"` note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest note: ...
diff --git a/Cargo.toml b/Cargo.toml index ce2d04a..572bfee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "blobby", "block-buffer",
1
1
0
708aa72b9ebde06a02e862368e890fb3ddcb2fb9
Tony Arcieri
2023-11-02T23:28:48
wycheproof2blb: secp521r1 support (#980) Adds support for extracting secp521r1 test vectors from Wycheproof, in order to test the `p521` crate.
diff --git a/wycheproof2blb/src/ecdsa.rs b/wycheproof2blb/src/ecdsa.rs index 7c01a11..186c551 100644 --- a/wycheproof2blb/src/ecdsa.rs +++ b/wycheproof2blb/src/ecdsa.rs @@ -55,7 +55,10 @@ pub fn generator(data: &[u8], algorithm: &str, _key_size: u32) -> Vec<TestInfo> let mut infos = vec![]; for g in &suite.te...
2
8
1
6c39ebbada8d30c20ba9a993affc1ac2945b9b26
Artyom Pavlov
2023-10-27T23:52:28
hybrid-array: tweak ArraySize docs, remove static bound (#976)
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 67f2f11..8f6d7a0 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -605,13 +605,11 @@ impl<T, const N: usize> ArrayExt<T> for [T; N] { /// # Safety /// /// `ArrayType` MUST be an array with a number of elements exactly equal to ...
1
4
6
316f8648d7a0d93850f909bfaa1f4471f0c953d1
Artyom Pavlov
2023-10-27T21:57:12
hybrid-array: add slice_as_chunks(_mut) methods, minor refactoring (#974)
diff --git a/hybrid-array/src/impls.rs b/hybrid-array/src/impls.rs new file mode 100644 index 0000000..72cf3e3 --- /dev/null +++ b/hybrid-array/src/impls.rs @@ -0,0 +1,146 @@ +use super::{Array, ArrayOps, ArraySize, IntoArray}; + +macro_rules! impl_array_size { + ($($len:expr => $ty:ident),+) => { + $( + ...
3
261
219
a0874f58b67af45c9c219db7195bcab0f479cfee
ty
2023-10-26T17:15:15
cpufeatures: add support for aarch64's sm4 target feature (#972)
diff --git a/cpufeatures/src/aarch64.rs b/cpufeatures/src/aarch64.rs index 2c9a044..2305d89 100644 --- a/cpufeatures/src/aarch64.rs +++ b/cpufeatures/src/aarch64.rs @@ -69,6 +69,7 @@ __expand_check_macro! { ("aes", AES), // Enable AES support. ("sha2", SHA2), // Enable SHA1 and SHA256 support. ...
3
7
1
fd04ea5f3588e3715992227087f420a852a5289c
Tony Arcieri
2023-10-26T01:27:40
hybrid-array v0.2.0-pre.5 (#971)
diff --git a/Cargo.lock b/Cargo.lock index a4ea8e8..cfa0eea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,7 +95,7 @@ version = "0.4.1" [[package]] name = "hybrid-array" -version = "0.2.0-pre.4" +version = "0.2.0-pre.5" dependencies = [ "typenum", ] diff --git a/hybrid-array/Cargo.toml b/hybrid-array/Cargo.tom...
2
2
2
840f11b09886ab5139927dc845f35f5ae032d1f7
Ruslan Piasetskyi
2023-10-14T14:48:45
hybrid-array: implement concat and split methods (#958) Convenient methods for concatenation and splitting. The size of the result is calculated in the compile time. This implementation was inspired by GenericArray implementation of Concat and Split traits. Co-authored-by: Ruslan Piasetskyi <ruslan.piasetskyi0...
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index e4817ad..7c40713 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -32,10 +32,12 @@ use core::{ cmp::Ordering, fmt::{self, Debug}, hash::{Hash, Hasher}, - ops::{Deref, DerefMut, Index, IndexMut, Range}, + mem::...
1
116
3
eb03093d97e2f2a61c4bf1135a2492af343ccaa3
Tony Arcieri
2023-10-08T17:03:54
hybrid-array: impl `IntoIterator` for references to all `ArraySize`s (#957) Switches from a special case impl per size to one which is generic over all array sizes, similar to what #956 did for the owning implementation of `IntoIterator`.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index d618b33..e4817ad 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -66,13 +66,13 @@ where /// Returns an iterator over the array. #[inline] - fn iter(&self) -> Iter<'_, T> { + pub fn iter(&self) -> Iter<'_, T> { ...
1
27
21
71ec948f39cf2fcf78fe5a67f967a26e81529972
Tony Arcieri
2023-10-08T16:37:21
hybrid-array: impl `IntoIterator` for all `ArraySize`s (#956) Uses an `IntoIterator` bound on `ArraySize::ArrayType` and forwards the trait invocation to the inner array.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 1212b2c..d618b33 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -27,7 +27,7 @@ pub use typenum; pub use typenum::consts; use core::{ - array::{IntoIter, TryFromSliceError}, + array::TryFromSliceError, borrow::{Bor...
1
18
15
c19c5cc64e51805f5e3d64234a22559f75bee0cb
Coda Hale
2023-10-03T16:01:16
cmov: add CmovEq impl for slices (#954)
diff --git a/cmov/src/lib.rs b/cmov/src/lib.rs index 0491fdf..48b682c 100644 --- a/cmov/src/lib.rs +++ b/cmov/src/lib.rs @@ -134,3 +134,25 @@ impl CmovEq for u128 { tmp.cmoveq(&1, input, output); } } + +impl<T: CmovEq> CmovEq for [T] { + fn cmoveq(&self, rhs: &Self, input: Condition, output: &mut Cond...
2
60
0
582883ad0fd136b7a364f9e03aaa11bbc192ba4c
jake
2023-10-03T15:30:45
cmov: XOR within the ASM block (#925)
diff --git a/cmov/src/x86.rs b/cmov/src/x86.rs index d067620..7344f10 100644 --- a/cmov/src/x86.rs +++ b/cmov/src/x86.rs @@ -25,6 +25,24 @@ macro_rules! cmov { }; } +macro_rules! cmov_eq { + ($xor:expr, $instruction:expr, $lhs:expr, $rhs:expr, $condition:expr, $dst:expr) => { + let mut tmp = *$dst as ...
1
66
6
443ff0bb39568454239c24d9169ae97c54e25018
Tony Arcieri
2023-09-05T18:14:36
hybrid-array v0.2.0-pre.4 (#946)
diff --git a/Cargo.lock b/Cargo.lock index 89e0d27..507c39a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,7 @@ version = "0.4.1" [[package]] name = "hybrid-array" -version = "0.2.0-pre.3" +version = "0.2.0-pre.4" dependencies = [ "typenum", ] diff --git a/hybrid-array/Cargo.toml b/hybrid-array/Cargo.tom...
2
2
2
7df3faa3e997a1933604c5c7f11ee9e49e661e7a
Tony Arcieri
2023-09-05T17:36:58
hybrid-array: impl `From<Array<T, U>>` for `[T; N]` (#945) Allows for converting a hybrid array to its inner core array.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 2f76c6c..1212b2c 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -556,6 +556,12 @@ macro_rules! impl_array_size { type ArrayType<T> = [T; $len]; } + impl<T> From<Array<T, typenum::$ty>> ...
1
6
0
2e78c4b5c8986a1174519b7b256793639104c2b2
Tony Arcieri
2023-09-05T01:30:03
hybrid-array v0.2.0-pre.3 (#943)
diff --git a/Cargo.lock b/Cargo.lock index 7613939..89e0d27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,7 @@ version = "0.4.1" [[package]] name = "hybrid-array" -version = "0.2.0-pre.2" +version = "0.2.0-pre.3" dependencies = [ "typenum", ] diff --git a/hybrid-array/Cargo.toml b/hybrid-array/Cargo.tom...
2
2
2
2f0d4132ef649fb3103fb88c1ec2c7f2e26ce3cb
Tony Arcieri
2023-09-05T01:08:47
hybrid-array: fix reference conversions (#942) The target type on the pointer cast is incorrect: it should be `*const Array<T, U>` but instead it's `*const &Array<T, U>`. This is a memory safety error. It was introduced in #904 and thus has never been in anything but v0.2 prereleases, so it isn't particularly se...
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index cdc244f..2f76c6c 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -362,7 +362,7 @@ where // SAFETY: `Array<T, U>` is a `repr(transparent)` newtype for a core // array with length checked above. - Ok(unsa...
1
28
9
e33af5c48c8c1bb88f11aac506d627155be928f3
Tony Arcieri
2023-09-04T23:37:25
hybrid-array: looser `Debug` impl on `Array` (#941) Removes the `U::ArrayType<T>: Debug` bound, leveraging the `Debug` impl on `[T]` instead.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 79b79b4..cdc244f 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -194,10 +194,9 @@ impl<T, U> Debug for Array<T, U> where T: Debug, U: ArraySize, - U::ArrayType<T>: Debug, { fn fmt(&self, f: &mut fmt::Formatte...
1
1
2
8df574711ec3177c27b58f52a5e0de5107660ca7
Tony Arcieri
2023-09-04T23:19:09
hybrid-array: use handwritten instead of derived impls (#940) Uses handwritten impls for the following traits on the `Array` type: - Debug - Eq - Hash - PartialEq - PartialOrd - Ord The handwritten impls have looser bounds.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 3306c24..79b79b4 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -29,6 +29,9 @@ pub use typenum::consts; use core::{ array::{IntoIter, TryFromSliceError}, borrow::{Borrow, BorrowMut}, + cmp::Ordering, + fmt::{sel...
1
62
1
07264426b78b49dee716ee31488f86b01382218a
Tony Arcieri
2023-09-04T22:46:04
hybrid-array: looser `Clone` and `Copy` bounds on `Array` (#939) Switches from derived impls of `Clone` and `Copy` to handwritten ones which use the minimal required bounds for the underlying types.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 84abb90..3306c24 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -38,7 +38,7 @@ use typenum::Unsigned; /// /// Provides the flexibility of typenum-based expressions while also /// allowing interoperability and a transition pat...
1
19
1
0ac44e69a035d70172e74941f0f8efec68876d0b
tirz
2023-08-20T15:16:03
block-padding: fix error message for ANSI X9.23 (#935)
diff --git a/block-padding/src/lib.rs b/block-padding/src/lib.rs index c52e2cc..8190c8d 100644 --- a/block-padding/src/lib.rs +++ b/block-padding/src/lib.rs @@ -276,7 +276,7 @@ impl RawPadding for AnsiX923 { fn raw_pad(block: &mut [u8], pos: usize) { // TODO: use bounds to check it at compile time ...
1
2
2
0fbf6bf9b0cef0b424274a04e6ab4602775f877e
tirz
2023-08-20T15:14:58
block-padding: replace block iteration with fill() (#934)
diff --git a/block-padding/src/lib.rs b/block-padding/src/lib.rs index be950cc..c52e2cc 100644 --- a/block-padding/src/lib.rs +++ b/block-padding/src/lib.rs @@ -138,9 +138,7 @@ impl RawPadding for ZeroPadding { if pos > block.len() { panic!("`pos` is bigger than block size"); } - f...
1
4
12
50fd77561bd23728b016e1d66dc5a0de24a543d4
Artyom Pavlov
2023-07-08T22:05:50
zeroize: remove unnecessary cfgs on SIMD type impls (#930)
diff --git a/zeroize/src/aarch64.rs b/zeroize/src/aarch64.rs index b26cb18..ee47462 100644 --- a/zeroize/src/aarch64.rs +++ b/zeroize/src/aarch64.rs @@ -8,13 +8,13 @@ use crate::{atomic_fence, volatile_write, Zeroize}; use core::arch::aarch64::*; macro_rules! impl_zeroize_for_simd_register { - ($(($type:ty, $vdu...
2
22
36
602240f1068dfe5fb22a9e89fe669d7996f87830
jake
2023-07-08T16:30:26
cmov: use `#[inline]` instead of `#[inline(always)]` (#924)
diff --git a/cmov/src/aarch64.rs b/cmov/src/aarch64.rs index 8292047..1a909f6 100644 --- a/cmov/src/aarch64.rs +++ b/cmov/src/aarch64.rs @@ -40,72 +40,72 @@ macro_rules! csel_eq { } impl Cmov for u16 { - #[inline(always)] + #[inline] fn cmovnz(&mut self, value: &Self, condition: Condition) { cse...
4
49
49
98478814a587a397dff23317b398839ee31953ac
Artyom Pavlov
2023-07-05T11:10:13
Fix clippy lints (#928)
diff --git a/cpufeatures/src/lib.rs b/cpufeatures/src/lib.rs index dfd1fea..18bdc7e 100644 --- a/cpufeatures/src/lib.rs +++ b/cpufeatures/src/lib.rs @@ -103,7 +103,7 @@ )] #[cfg(not(miri))] -#[cfg(all(target_arch = "aarch64"))] +#[cfg(target_arch = "aarch64")] #[doc(hidden)] pub mod aarch64; diff --git a/hybrid...
2
3
3
721520334eee6b8465a2c8eb1e73074453c9f11a
jake
2023-07-05T10:24:50
cpufeatures: add support for `avx512vbmi(2)` (#926)
diff --git a/cpufeatures/src/x86.rs b/cpufeatures/src/x86.rs index 2199f27..958eff3 100644 --- a/cpufeatures/src/x86.rs +++ b/cpufeatures/src/x86.rs @@ -142,4 +142,6 @@ __expand_check_macro! { ("sha", "xmm", 1, ebx, 29), ("avx512bw", "zmm", 1, ebx, 30), ("avx512vl", "zmm", 1, ebx, 31), + ("avx512vbmi"...
1
2
0
adbf3871d6a08bfe419906e59eec79795b5b8f52
Артём Павлов [Artyom Pavlov]
2023-06-26T11:02:14
Update Cargo.lock
diff --git a/Cargo.lock b/Cargo.lock index 6f6b616..24c438d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,9 +115,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/...
1
8
8
6ad2abf2b41feef6f8adf9fdaee5fb9c9b1e3849
Артём Павлов [Artyom Pavlov]
2023-06-09T04:58:39
Update Cargo.lock
diff --git a/Cargo.lock b/Cargo.lock index f2e0b7e..ee662a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,9 +115,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.146" source = "registry+https://github.com/rust-lang/...
1
14
14
e4dff327bd84281628ff6b1a2ce0f66a6ad29fc0
Tony Arcieri
2023-05-31T02:21:34
hybrid-array v0.2.0-pre.2 (#917)
diff --git a/Cargo.lock b/Cargo.lock index 2b562c9..f2e0b7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,7 @@ version = "0.4.1" [[package]] name = "hybrid-array" -version = "0.2.0-pre.1" +version = "0.2.0-pre.2" dependencies = [ "typenum", ] diff --git a/hybrid-array/Cargo.toml b/hybrid-array/Cargo.tom...
2
2
2
f117cc1977972f288786a8b64c07e6028a8c1b84
Tony Arcieri
2023-05-31T02:05:45
hybrid-array: rename `ArrayOps` methods (#916) Renames the following methods of the `ArrayOps` trait: - `as_array_ref` -> `as_core_array` - `as_array_mut` -> `as_mut_core_array` - `from_core_array_ref` -> `ref_from_core_array` - `from_core_array_mut` -> `ref_from_mut_core_array` - `map` -> `map_to_core_array`
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 86e2c9f..e7004e2 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -133,7 +133,7 @@ where { #[inline] fn as_ref(&self) -> &[T; N] { - self.as_array_ref() + self.as_core_array() } } @@ -144,7 +144,7 ...
1
16
16
fc8d750adcd5a3beeb9a562c16c37145ddaff0cc
Tony Arcieri
2023-05-31T00:56:56
hybrid-array: re-export `typenum::consts` (#915)
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 38da7bf..86e2c9f 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -24,6 +24,7 @@ )] pub use typenum; +pub use typenum::consts; use core::{ array::{IntoIter, TryFromSliceError},
1
1
0
04a440a25d438e64962e0d621592ce8a885ba912
Tony Arcieri
2023-05-31T00:45:00
hybrid-array: make `ArraySize` an `unsafe trait` (#914) It's used when checking the lengths of slices match an array size prior to using a pointer cast to convert types. If someone were to make their own `typenum::Unsigned` type and impl `ArraySize` for it with an `ArrayType` whose size does not match `Unsigned:...
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 8c08cca..38da7bf 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -304,10 +304,16 @@ where } /// Generate a [`TryFromSliceError`] if the slice doesn't match the given length. -fn check_slice_length<T, U: Unsigned>(slice: &[T])...
1
22
4
14b1e130a84e1a15967b6d17b9daec265794ed68
Tony Arcieri
2023-05-31T00:02:02
hybrid-array: change `Deref::Target` to `[T]` (#913) This makes porting existing `generic-array` code easier, and also means deref coercion will allow `&Array<T, _>` to deref to `&[T]`, making it usable anywhere a slice is.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index ef70b36..8c08cca 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -183,10 +183,11 @@ impl<T, U> Deref for Array<T, U> where U: ArraySize, { - type Target = U::ArrayType<T>; + type Target = [T]; - fn deref(&self) ...
1
7
7
1c599fd6c86a2721bf7bc6a57bf35e192328e134
Tony Arcieri
2023-05-30T23:20:53
hybrid-array v0.2.0-pre.1 (#912)
diff --git a/Cargo.lock b/Cargo.lock index bed4c89..2b562c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,7 @@ version = "0.4.1" [[package]] name = "hybrid-array" -version = "0.2.0-pre.0" +version = "0.2.0-pre.1" dependencies = [ "typenum", ] diff --git a/hybrid-array/Cargo.toml b/hybrid-array/Cargo.tom...
2
2
2
0fa48b78cd8aaa1119add63fdc55e5617ad6ab11
Tony Arcieri
2023-05-30T22:11:08
hybrid-array: unseal `ArrayExt` (#911) It's leaked through `ArraySize::ArrayType` bounds, and it may potentially be useful to have in the public API.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index d8c0191..ef70b36 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -50,7 +50,7 @@ where where F: FnMut(usize) -> T, { - Self(sealed::ArrayExt::from_fn(cb)) + Self(ArrayExt::from_fn(cb)) } ...
1
41
43
df502cdda7156fbd9b92c714d976ed7e01ba6feb
Tony Arcieri
2023-05-30T21:39:49
hybrid-array: leverage `ArrayExt` to factor more methods onto `Array` (#910) Changes `ArrayOps` to contain only operations that need to know the exact size (as a const generic) of an associated array.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 491a1e2..d8c0191 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -45,6 +45,34 @@ impl<T, U> Array<T, U> where U: ArraySize, { + /// Create array where each array element `T` is returned by the `cb` call. + pub fn fro...
1
44
37
3fd603275f5d3ed495b70546746de0778f9453f4
Tony Arcieri
2023-05-30T21:16:44
hybrid-array: test `TryFrom<&[u8]>` for `&Array<T, U>` impl (#909)
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 36e439f..491a1e2 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -408,10 +408,12 @@ macro_rules! impl_array_size { const SIZE: usize = $len; type Size = typenum::$ty; + #[inline]...
1
20
0
6813b81a6a9aa573055c2e477a84563a918f9e91
Tony Arcieri
2023-05-30T16:00:46
hybrid-array: add `Deref`/`DerefMut` impls for `Array` (#908) Derefs to the inner core array type. Also adds bounds for `Deref`/`DerefMut` to `ArrayOps`, with a `Target` of `[T; N]`.
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index c2c3473..36e439f 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -28,7 +28,7 @@ pub use typenum; use core::{ array::{IntoIter, TryFromSliceError}, borrow::{Borrow, BorrowMut}, - ops::{Index, IndexMut, Range}, + o...
1
23
1
ee1c0e35932cf7eb005adcc1b88b861de394e5d0
Tony Arcieri
2023-05-30T15:23:02
hybrid-array: add sealed::ArrayExt trait (#907) Adds an extension trait with a blanket impl for all core arrays, and adds it to the bounds for `ArraySize::ArrayType`. It currently provides a `from_fn` constructor which is now leveraged by a now-generic `Default` impl which bounds on `ArraySize`. This reduces t...
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index abdc9d1..c2c3473 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -141,6 +141,16 @@ where } } +impl<T, U> Default for Array<T, U> +where + T: Default, + U: ArraySize, +{ + fn default() -> Self { + Self(seal...
1
38
17
391b9921d6dc8cb44be6574fe9b794f21b81f319
Tony Arcieri
2023-05-30T03:43:57
hybrid-array: impl `Default` for `Array` (#905)
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 7a0f30e..abdc9d1 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -244,6 +244,16 @@ where } } +/// Generate a [`TryFromSliceError`] if the slice doesn't match the given length. +fn check_slice_length<T, U: Unsigned>(slice:...
1
19
10
17f5d341ff26f1d7c38979b6d5fabd6c46aa7a25
Tony Arcieri
2023-05-30T03:31:58
hybrid-array: move array type definition to top of file (#906)
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 0643839..7a0f30e 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -33,6 +33,220 @@ use core::{ }; use typenum::Unsigned; +/// Hybrid typenum-based and const generic array type. +/// +/// Provides the flexibility of typenum-bas...
1
214
214
b6cedcf47133672230e8258affd93c72229ec533
Tony Arcieri
2023-05-30T03:04:36
hybrid-array: reference conversion support (#904) Adds a set of reference conversions to `Array<T, U>` as well as the `ArrayOps` trait: - `&Array<T, U>`: `From<&[T, N]>` + TryFrom<&[T]> - `&mut Array<T, U>`: `From<&mut [T, N]>` + `TryFrom<&mut [T]>` The implementation uses an unsafe pointer cast to convert a s...
diff --git a/hybrid-array/src/lib.rs b/hybrid-array/src/lib.rs index 41ff4a9..0643839 100644 --- a/hybrid-array/src/lib.rs +++ b/hybrid-array/src/lib.rs @@ -5,7 +5,6 @@ html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg", html_favicon_url = "https://raw.githubusercontent.com/Ru...
1
119
1
017165f4c509ed137f0afbafac59215cb20490c7
Артём Павлов [Artyom Pavlov]
2023-05-16T10:29:11
Update Cargo.lock
diff --git a/Cargo.lock b/Cargo.lock index 48262fb..542d212 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,9 +115,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "libc" -version = "0.2.141" +version = "0.2.144" source = "registry+https://github.com/rust-lang/...
1
14
14
3ec050400090ae1561f9e250a080a8a63d039a1f
Alexander Wagner
2023-05-11T14:07:05
zeroize: Update comments on MSRV (#896)
diff --git a/zeroize/src/aarch64.rs b/zeroize/src/aarch64.rs index 956f648..b26cb18 100644 --- a/zeroize/src/aarch64.rs +++ b/zeroize/src/aarch64.rs @@ -1,7 +1,7 @@ //! [`Zeroize`] impls for ARM64 SIMD registers. //! //! Gated behind the `aarch64` feature: MSRV 1.59 -//! (the overall crate is MSRV 1.51) +//! (the ov...
2
2
2
b30adcf5fd9899e9a5f80fa625546d7c3688b0fc
Tony Arcieri
2023-05-06T14:53:38
hybrid-array v0.2.0-pre.0 (#894)
diff --git a/Cargo.lock b/Cargo.lock index 85dfeba..48262fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,7 @@ version = "0.4.1" [[package]] name = "hybrid-array" -version = "0.2.0-pre" +version = "0.2.0-pre.0" dependencies = [ "typenum", ] diff --git a/hybrid-array/Cargo.toml b/hybrid-array/Cargo.toml ...
2
2
2
72505ea620ee4d557a68372b6ba44a87f7d2ab1b
Roman Volosatovs
2023-04-19T14:28:37
cpufeatures: support freestanding/UEFI `x86` targets (#821) This fixes compilation of dependent crates for these targets. For example, `sha2`: Before: ``` $ cargo build --target x86_64-unknown-none --no-default-features Compiling sha2 v0.10.6 (/home/rvolosatovs/src/github.com/rustcrypto/hashes/sha2) LLVM ...
diff --git a/cpufeatures/src/x86.rs b/cpufeatures/src/x86.rs index a60fa0d..3eb5ae9 100644 --- a/cpufeatures/src/x86.rs +++ b/cpufeatures/src/x86.rs @@ -14,11 +14,12 @@ macro_rules! __unless_target_features { ($($tf:tt),+ => $body:expr ) => {{ #[cfg(not(all($(target_feature=$tf,)*)))] { - ...
1
4
3