Skip to content

Commit

Permalink
Merge pull request #27 from RustCrypto/fix-word-idx-warning
Browse files Browse the repository at this point in the history
salsa20-core: Address `word_idx`-related warning (closes #23)
  • Loading branch information
tarcieri committed Aug 13, 2019
2 parents b08e245 + 2284811 commit daafc49
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions salsa20-core/src/salsa_family_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,10 @@ pub trait SalsaFamilyCipher {
i += 1;
}
}

self.next_block();
} else {
// TODO(tarcieri): is this else clause unnecessary or is there a bug?
// See: <https://github.com/RustCrypto/stream-ciphers/issues/23>
#[allow(unused_assignments)]
{
word_idx = 0;
self.next_block();
}
}

self.next_block();

let nblocks = (datalen - i) / 64;
let leftover = (datalen - i) % 64;

Expand Down

0 comments on commit daafc49

Please sign in to comment.