INNER CODE UNIT · Rust

byte

TheMaxMur/RS-Key · crates/rsk-bip39/src/lib.rs:40

        let byte = if b < 256 { entropy[b / 8] } else { checksum };
        ((byte >> (7 - (b % 8))) & 1) as u16
    };
    let mut idx = [0u16; WORD_COUNT];
    let mut i = 0;
    while i < WORD_COUNT {
        let mut v = 0u16;
        let mut j = 0;
        while j < 11 {
            v = (v << 1) | bit(i * 11 + j);
            j += 1;
        }
        idx[i] = v;
        i += 1;
    }
    idx
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…