Skip to main content

encode_raw_n

Function encode_raw_n 

Source
pub const fn encode_raw_n<const N: usize>(src: &[u8; N]) -> ArrayStr<N>
Expand description

Encodes a fixed-size byte array to base64_url without padding.

§Arguments

  • src - The byte array to encode

§Returns

An ArrayStr containing the encoded output without padding.

§Example

use omp_core::base64_url;
let data = [0x48u8, 0x65, 0x6c, 0x6c, 0x6f];
let encoded = base64_url::encode_raw_n(&data);