Skip to content

Commit

Permalink
chacha20: use cpufeatures v0.1 crate release (#230)
Browse files Browse the repository at this point in the history
Renamed from `cpuid-bool`
  • Loading branch information
tarcieri committed Apr 29, 2021
1 parent 2c2e951 commit 53d0c27
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chacha20/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rand_core = { version = "0.6", optional = true, default-features = false }
zeroize = { version = "1", optional = true, default-features = false }

[target.'cfg(any(target_arch = "x86_64", target_arch = "x86"))'.dependencies]
cpuid-bool = "0.2"
cpufeatures = "0.1"

[dev-dependencies]
cipher = { version = "0.3", features = ["dev"] }
Expand Down
2 changes: 1 addition & 1 deletion chacha20/src/backend/autodetect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use core::mem::ManuallyDrop;
/// backend, which operates on two blocks in parallel for optimal performance.
pub(crate) const BUFFER_SIZE: usize = BLOCK_SIZE * 2;

cpuid_bool::new!(avx2_cpuid, "avx2");
cpufeatures::new!(avx2_cpuid, "avx2");

/// The ChaCha20 core function.
pub struct Core<R: Rounds> {
Expand Down

0 comments on commit 53d0c27

Please sign in to comment.