|
|
@ -57,8 +57,7 @@ impl Digest { |
|
|
|
|
|
|
|
|
|
|
|
impl fmt::Display for Digest { |
|
|
|
impl fmt::Display for Digest { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
let ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
write!(f, "{}", std::string::String::from(self)) |
|
|
|
write!(f, "{}", base64_url::encode(&ser)) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -114,7 +113,8 @@ impl SymKey { |
|
|
|
|
|
|
|
|
|
|
|
impl fmt::Display for SymKey { |
|
|
|
impl fmt::Display for SymKey { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
let ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
let mut ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
|
|
|
|
ser.reverse(); |
|
|
|
write!(f, "{}", base64_url::encode(&ser)) |
|
|
|
write!(f, "{}", base64_url::encode(&ser)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -196,7 +196,8 @@ impl PubKey { |
|
|
|
|
|
|
|
|
|
|
|
impl fmt::Display for PubKey { |
|
|
|
impl fmt::Display for PubKey { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
let ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
let mut ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
|
|
|
|
ser.reverse(); |
|
|
|
write!(f, "{}", base64_url::encode(&ser)) |
|
|
|
write!(f, "{}", base64_url::encode(&ser)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -278,7 +279,8 @@ impl TryFrom<&str> for PrivKey { |
|
|
|
|
|
|
|
|
|
|
|
impl fmt::Display for PrivKey { |
|
|
|
impl fmt::Display for PrivKey { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
let ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
let mut ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
|
|
|
|
ser.reverse(); |
|
|
|
write!(f, "{}", base64_url::encode(&ser)) |
|
|
|
write!(f, "{}", base64_url::encode(&ser)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -543,8 +545,9 @@ pub enum OverlayId { |
|
|
|
|
|
|
|
|
|
|
|
impl fmt::Display for OverlayId { |
|
|
|
impl fmt::Display for OverlayId { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
|
|
|
let overlay_ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
let mut ser = serde_bare::to_vec(&self).unwrap(); |
|
|
|
write!(f, "{}", base64_url::encode(&overlay_ser)) |
|
|
|
ser.reverse(); |
|
|
|
|
|
|
|
write!(f, "{}", base64_url::encode(&ser)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|