pub fn encode_u32(num: u32) -> Vec<&'static str> {
    let mut bytes = vec![
        ((num >> 24) & 0xFF) as u8,
        ((num >> 16) & 0xFF) as u8,
        ((num >> 8) & 0xFF) as u8,
        (num & 0xFF) as u8,
    ];
    // Drop leading zeros
    while bytes.len() > 1 {
        if bytes[0] == 0 {
            bytes.remove(0);
        } else {
            break;
        }
    }
    encode_bytes(&bytes)
}
/// Encode a u32 into a vector of words. The output vector will have at least one
/// entry, and no more than four entries; each entry is a single human-language word.
/// Each byte of the u32 is converted to a word, with leading zero bytes dropped.
Encode a u32 into a vector of words. The output vector will have at least one
entry, and no more than four entries; each entry is a single human-language word.
Each byte of the u32 is converted to a word, with leading zero bytes dropped.
Encode a u32 into a vector of words . The output vector will have at least one entry and no more than four entries ; each entry is a single human - language word . Each byte of the u32 is converted to a word with leading zero bytes dropped .
pub fn encode_u32(num: u32) -> Vec<&'static str> {
    let mut bytes = vec![
        ((num >> 24) & 0xFF) as u8,
        ((num >> 16) & 0xFF) as u8,
        ((num >> 8) & 0xFF) as u8,
        (num & 0xFF) as u8,
    ];
    // Drop leading zeros
    while bytes.len() > 1 {
        if bytes[0] == 0 {
            bytes.remove(0);
        } else {
            break;
        }
    }
    encode_bytes(&bytes)
}
pub fn encode_u32 ( num : u32 ) -> Vec < & ' static str > { let mut bytes = vec ! [ ( ( num 24 ) 0xFF ) as u8 ( ( num 16 ) 0xFF ) as u8 ( ( num 8 ) 0xFF ) as u8 ( num 0xFF ) as u8 ] ; // Drop leading zeros while bytes . len ( ) > 1 { if bytes [ 0 ] == 0 { bytes . remove ( 0 ) ; } else { break ; } } encode_bytes ( & bytes ) }
Encode a u32 into a vector of words.
Encode a u32 into a vector of words .
num
u32
num
u32