pub fn decode_u32(encoded_words: &[&str]) -> Result<u32, usize> {
    let bytes = decode_bytes(encoded_words)?;
    if bytes.len() > 4 {
        return Err(4);
    }
    let mut result: u32 = 0;
    for b in bytes {
        result = (result << 8) | (b as u32 & 0xFF);
    }
    Ok(result)
}
/// Decode a vector of words (as produced by `encode_u32`) back into the
/// u32 that produced them. If the provided word vector has more than 4
/// words, then an `Err(4)` is produced; if any the words are invalid, then
/// an `Err` is produced with the index of the bad entry in the input vector.
Decode a vector of words (as produced by `encode_u32`) back into the
u32 that produced them. If the provided word vector has more than 4
words, then an `Err(4)` is produced; if any the words are invalid, then
an `Err` is produced with the index of the bad entry in the input vector.
Decode a vector of words ( as produced by ` encode_u32 ` ) back into the u32 that produced them . If the provided word vector has more than 4 words then an ` Err ( 4 ) ` is produced ; if any the words are invalid then an ` Err ` is produced with the index of the bad entry in the input vector .
pub fn decode_u32(encoded_words: &[&str]) -> Result<u32, usize> {
    let bytes = decode_bytes(encoded_words)?;
    if bytes.len() > 4 {
        return Err(4);
    }
    let mut result: u32 = 0;
    for b in bytes {
        result = (result << 8) | (b as u32 & 0xFF);
    }
    Ok(result)
}
pub fn decode_u32 ( encoded_words : & [ & str ] ) -> Result < u32 , usize > { let bytes = decode_bytes ( encoded_words ) ? ; if bytes . len ( ) > 4 { return Err ( 4 ) ; } let mut result : u32 = 0 ; for b in bytes { result = ( result << 8 ) | ( b as u32 & 0xFF ) ; } Ok ( result ) }
Decode a vector of words (as produced by `encode_u32`) back into the
u32 that produced them.
Decode a vector of words ( as produced by ` encode_u32 ` ) back into the u32 that produced them .
encoded_words
&[&str]
encoded_words
&[&str]