Rename Fingerprint::from() -> to_keyset()

This commit is contained in:
Heiko Schaefer 2021-08-25 21:27:28 +02:00
parent f3bfecd185
commit 5df81dd464
2 changed files with 5 additions and 2 deletions

View file

@ -82,7 +82,10 @@ fn fingerprints(input: &[u8]) -> nom::IResult<&[u8], KeySet<Fingerprint>> {
)
}
pub fn from(input: &[u8]) -> Result<KeySet<Fingerprint>, OpenpgpCardError> {
/// Parse three fingerprints from the card into a KeySet of Fingerprints
pub(crate) fn to_keyset(
input: &[u8],
) -> Result<KeySet<Fingerprint>, OpenpgpCardError> {
log::trace!("Fingerprint from input: {:x?}, len {}", input, input.len());
// The input may be longer than 3 fingerprint, don't fail if it hasn't

View file

@ -140,7 +140,7 @@ impl ApplicationRelatedData {
let fp = self.0.find(&Tag::from([0xc5]));
if let Some(fp) = fp {
let fp = fingerprint::from(&fp.serialize())?;
let fp = fingerprint::to_keyset(&fp.serialize())?;
log::debug!("Fp: {:x?}", fp);