We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 329568a + d5d61aa commit 42b35bcCopy full SHA for 42b35bc
src/lib.rs
@@ -332,8 +332,7 @@ fn generate_filler(hops_keys: &[HopKeys], hops_data: &[Vec<u8>]) -> Result<Vec<u
332
for (i, (data, keys)) in hops_data.iter().zip(hops_keys.iter()).enumerate() {
333
let mut chacha = ChaCha20::new(&keys.rho.into(), &[0u8; 12].into());
334
335
- // For each hop, generate 1300 bytes of random data from the cipher stream. Drop the first
336
- // ONION_PACKET_DATA_LEN bytes and apply the rest to the filler.
+ // Skip `ONION_PACKET_DATA_LEN - pos` bytes in the stream
337
for _ in 0..(ONION_PACKET_DATA_LEN - pos) {
338
let mut dummy = [0; 1];
339
chacha.apply_keystream(&mut dummy);
0 commit comments