Skip to main content

encode_n

Function encode_n 

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

Encodes a fixed-size byte array to base32_hex with padding.

§Arguments

  • src - The byte array to encode

§Returns

An ArrayStr containing the encoded output.

§Example

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