Skip to content

Commit 0fe2312

Browse files
authored
Make {get,set}_block_pos inherent methods pub (#516)
Corrects an oversight from #512.
1 parent fdbab62 commit 0fe2312

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

chacha20/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,17 @@ impl<R: Rounds, V: Variant> ChaChaCore<R, V> {
266266
}
267267
}
268268

269+
/// Get the current block position.
269270
#[cfg(any(feature = "cipher", feature = "rng"))]
270271
#[inline(always)]
271-
fn get_block_pos(&self) -> V::Counter {
272+
pub fn get_block_pos(&self) -> V::Counter {
272273
V::get_block_pos(&self.state[12..])
273274
}
274275

276+
/// Set the block position.
275277
#[cfg(any(feature = "cipher", feature = "rng"))]
276278
#[inline(always)]
277-
fn set_block_pos(&mut self, pos: V::Counter) {
279+
pub fn set_block_pos(&mut self, pos: V::Counter) {
278280
V::set_block_pos(&mut self.state[12..], pos);
279281
}
280282
}

0 commit comments

Comments
 (0)