Skip to main content

encode

Function encode 

Source
pub fn encode<S: AsRef<[u8]> + ?Sized>(src: &S) -> Encoder<'_>
Expand description

Encodes a byte slice to base32_dns with padding.

§Arguments

  • src - The byte slice to encode

§Returns

An iterator that yields encoded bytes.

§Example

use omp_core::base32_dns;
let encoded = base32_dns::encode(b"hello").into_string();