macro_toolset

Macro b64_encode

Source
macro_rules! b64_encode {
    ($data:expr) => { ... };
    ($data:expr, $padding:path) => { ... };
}
Expand description

Base64 encode

§Param:

  • data: impl AsRef<u8>
  • padding: base64::engine::general_purpose::{}, STANDARD(default) / STANDARD_NO_PAD / URL_SAFE / URL_SAFE_NO_PAD

§Example:

b64_encode!(b"hello world");