use std::fmt;
use crate::credential::Credential;
#[derive(PartialEq, Eq)]
pub struct AltchaConfig {
hmac_key: Credential,
}
impl AltchaConfig {
pub fn new(hmac_key: impl Into<String>) -> Self {
Self {
hmac_key: Credential::new(hmac_key),
}
}
}
impl fmt::Debug for AltchaConfig {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter
.debug_struct("AltchaConfig")
.field("hmac_key", &self.hmac_key)
.finish()
}
}