Skip to content

Commit

Permalink
update: changed Base64 inner type to Vec<u8>
Browse files Browse the repository at this point in the history
  • Loading branch information
Maix0 committed Dec 29, 2024
1 parent 3355753 commit 3ec2b2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};

const BASE64_ENGINE : base64::engine::GeneralPurpose = base64::engine::general_purpose::STANDARD;

pub(crate) struct Base64(pub(crate) HS256Key);
pub(crate) struct Base64(pub(crate) Vec<u8>);

impl std::fmt::Debug for Base64 {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
r#"b64"{}""#,
&BASE64_ENGINE.encode(self.0.to_bytes())
&BASE64_ENGINE.encode(self.0.as_slice())
)
}
}
Expand Down

0 comments on commit 3ec2b2c

Please sign in to comment.