openpgp-card: rename AlgorithmInformation::filter_by_keytype -> for_keytype
This commit is contained in:
parent
f7f7a1dd3c
commit
da776bc4cf
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2021-2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||||
|
||||
//! 4.4.3.11 Algorithm Information
|
||||
//! Algorithm Information [Spec section 4.4.3.11]
|
||||
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
|
@ -15,7 +15,7 @@ use crate::card_do::{algo_attrs, complete};
|
|||
use crate::KeyType;
|
||||
|
||||
impl AlgorithmInformation {
|
||||
pub fn filter_by_keytype(&self, kt: KeyType) -> Vec<&AlgorithmAttributes> {
|
||||
pub fn for_keytype(&self, kt: KeyType) -> Vec<&AlgorithmAttributes> {
|
||||
self.0
|
||||
.iter()
|
||||
.filter(|(k, _)| *k == kt)
|
||||
|
|
|
@ -292,7 +292,7 @@ fn card_algo_rsa(
|
|||
// Find suitable algorithm parameters (from card's list of algorithms).
|
||||
|
||||
// Get Algos for this keytype
|
||||
let keytype_algos: Vec<_> = algo_info.filter_by_keytype(key_type);
|
||||
let keytype_algos: Vec<_> = algo_info.for_keytype(key_type);
|
||||
// Get RSA algo attributes
|
||||
let rsa_algos: Vec<_> = keytype_algos
|
||||
.iter()
|
||||
|
@ -334,7 +334,7 @@ fn check_card_algo_ecc(
|
|||
// Find suitable algorithm parameters (from card's list of algorithms).
|
||||
|
||||
// Get Algos for this keytype
|
||||
let keytype_algos: Vec<_> = algo_info.filter_by_keytype(key_type);
|
||||
let keytype_algos: Vec<_> = algo_info.for_keytype(key_type);
|
||||
|
||||
// Get attributes
|
||||
let ecc_algos: Vec<_> = keytype_algos
|
||||
|
|
Loading…
Reference in a new issue