diff --git a/src/cccid.rs b/src/cccid.rs index 3a6e3e3..15dc447 100644 --- a/src/cccid.rs +++ b/src/cccid.rs @@ -78,9 +78,9 @@ impl CardId { /// Cardholder Capability Container (CCC) Identifier. #[derive(Copy, Clone, Debug, Eq, PartialEq)] -pub struct Ccc(pub [u8; Self::BYTE_SIZE]); +pub struct CccId(pub [u8; Self::BYTE_SIZE]); -impl Ccc { +impl CccId { /// CCC size in bytes pub const BYTE_SIZE: usize = 51; @@ -115,7 +115,7 @@ impl Ccc { } } -impl Display for Ccc { +impl Display for CccId { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(str::from_utf8(&hex::encode(&self.0[..])).unwrap()) } diff --git a/src/lib.rs b/src/lib.rs index a32e5c4..1e247cf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -158,7 +158,7 @@ mod transaction; mod yubikey; pub use crate::{ - cccid::{CardId, Ccc}, + cccid::{CardId, CccId}, certificate::Certificate, chuid::ChuId, config::Config, diff --git a/src/setting.rs b/src/setting.rs index 4799f56..327cb98 100644 --- a/src/setting.rs +++ b/src/setting.rs @@ -75,7 +75,7 @@ pub struct Setting { } impl Setting { - /// Get a [`SettingValue`] value by name. + /// Get a setting by name. pub fn get(key: &str, default: bool) -> Self { Self::from_file(key) .or_else(|| Self::from_env(key)) diff --git a/src/yubikey.rs b/src/yubikey.rs index 7bdfd7e..68d9693 100644 --- a/src/yubikey.rs +++ b/src/yubikey.rs @@ -32,7 +32,7 @@ use crate::{ apdu::{Apdu, Ins}, - cccid::Ccc, + cccid::CccId, chuid::ChuId, config::Config, error::{Error, Result}, @@ -275,8 +275,8 @@ impl YubiKey { } /// Get Cardholder Capability Container (CCC) Identifier. - pub fn cccid(&mut self) -> Result { - Ccc::get(self) + pub fn cccid(&mut self) -> Result { + CccId::get(self) } /// Authenticate to the card using the provided management key (MGM).