macro_toolset

Macro b64_encode_bytes

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

Base64 encode with bytes::Bytes returned

Param:

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

ยงExample:

b64_encode_bytes!(b"hello world");