AEAD internals: Remove redundant cpu_features
parameter from gcm::Context::is_avx2()
.
This commit is contained in:
parent
521081fd31
commit
4a0c4830af
@ -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;
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user