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 base64_url with padding.

§Arguments

  • src - The byte slice to encode

§Returns

An iterator that yields encoded bytes.

§Example

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