decode

Function decode 

Source
pub fn decode(word: &str) -> Result<Vec<u8>, DecodeError>
Expand description

Convert a big-endian base32 string back into a big-endian base256 number.

A byte array of size S=5N+K is encoded as a word of length l(S)=8N+f(K), where f(0) = 0, f(1) = 2, f(2) = 4, f(3) = 5 and f(4) = 7. Because l() is injective, we can determine the size S of a byte array given l(S).

Decoded a string that is not the result of encode is an error.