Skip to content

Commit 42b35bc

Browse files
authored
Merge pull request #3 from cryptape/simple-docs
docs: simplify code comment
2 parents 329568a + d5d61aa commit 42b35bc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ fn generate_filler(hops_keys: &[HopKeys], hops_data: &[Vec<u8>]) -> Result<Vec<u
332332
for (i, (data, keys)) in hops_data.iter().zip(hops_keys.iter()).enumerate() {
333333
let mut chacha = ChaCha20::new(&keys.rho.into(), &[0u8; 12].into());
334334

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.
335+
// Skip `ONION_PACKET_DATA_LEN - pos` bytes in the stream
337336
for _ in 0..(ONION_PACKET_DATA_LEN - pos) {
338337
let mut dummy = [0; 1];
339338
chacha.apply_keystream(&mut dummy);

0 commit comments

Comments
 (0)