[−][src]Function koibumi_base32::encode
pub fn encode(bytes: impl AsRef<[u8]>) -> String
Encodes byte array into Base32 string.
The input is arbitrary [u8]
slice
and the output is lowercase String
.
Using lowercase RFC4648 alphabet and can be used for Onion addresses.
Padding is not supported.
Examples
use koibumi_base32 as base32; let test = base32::encode(b"hello"); let expected = "nbswy3dp"; assert_eq!(test, expected);