AEAD internals: Remove redundant cpu_features parameter from gcm::Context::is_avx2().

This commit is contained in:
Brian Smith 2021-03-05 12:13:27 -08:00
parent 521081fd31
commit 4a0c4830af
2 changed files with 4 additions and 4 deletions

View File

@ -86,7 +86,7 @@ fn aes_gcm_seal(
#[cfg(target_arch = "x86_64")]
let in_out = {
if !aes_key.is_aes_hw() || !auth.is_avx2(cpu_features) {
if !aes_key.is_aes_hw() || !auth.is_avx2() {
in_out
} else {
use crate::c;
@ -163,7 +163,7 @@ fn aes_gcm_open(
#[cfg(target_arch = "x86_64")]
let in_out = {
if !aes_key.is_aes_hw() || !auth.is_avx2(cpu_features) {
if !aes_key.is_aes_hw() || !auth.is_avx2() {
in_out
} else {
use crate::c;

View File

@ -235,8 +235,8 @@ impl Context {
}
#[cfg(target_arch = "x86_64")]
pub(super) fn is_avx2(&self, cpu_features: cpu::Features) -> bool {
match detect_implementation(cpu_features) {
pub(super) fn is_avx2(&self) -> bool {
match detect_implementation(self.cpu_features) {
Implementation::CLMUL => has_avx_movbe(self.cpu_features),
_ => false,
}