Skip to content

Commit

Permalink
minor correction: WordPosInput doesn't force the bytes to be in littl…
Browse files Browse the repository at this point in the history
…e endian order
  • Loading branch information
nstilt1 committed Nov 11, 2023
1 parent 2d71ada commit b013266
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chacha20/src/rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ macro_rules! impl_chacha_rng {
/// As with `get_word_pos`, we use a 36-bit number. Since the generator
/// simply cycles at the end of its period (256 GiB), we ignore the upper 28
/// bits of a `u64`. When given a `[u8; 5]`, we ignore the first 4 bits of the
/// last little endian byte.
/// last byte.
#[inline]
pub fn set_word_pos<W: Into<WordPosInput>>(&mut self, word_offset: W) {
let word_offset: WordPosInput = word_offset.into();
Expand Down

0 comments on commit b013266

Please sign in to comment.