Function libipld::cid::multibase::encode

source ·
pub fn encode<T>(base: Base, input: T) -> String
where T: AsRef<[u8]>,
Expand description

Encode with the given byte slice to base string.

§Examples

use multibase::{Base, encode};

assert_eq!(encode(Base::Base58Btc, b"hello"), "zCn8eVZg");