Rename Ccc to CccId (#287)

This commit is contained in:
Tony Arcieri (iqlusion)
2021-07-12 19:28:46 -07:00
committed by GitHub
parent 42ae5fb974
commit 8e52d75992
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -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())
}
+1 -1
View File
@@ -158,7 +158,7 @@ mod transaction;
mod yubikey;
pub use crate::{
cccid::{CardId, Ccc},
cccid::{CardId, CccId},
certificate::Certificate,
chuid::ChuId,
config::Config,
+1 -1
View File
@@ -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))
+3 -3
View File
@@ -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> {
Ccc::get(self)
pub fn cccid(&mut self) -> Result<CccId> {
CccId::get(self)
}
/// Authenticate to the card using the provided management key (MGM).