Skip to content

Commit 6ee5eb9

Browse files
authored
cshake: add type aliases for readers (#855)
1 parent 4543dcb commit 6ee5eb9

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

cshake/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## 0.2.0 (UNRELEASED)
9+
### Added
10+
- `CShake128Reader` and `CShake256Reader` type aliases ([#855])
11+
912
### Changed
1013
- Internal implementation by removing unnecessary buffering ([#849])
1114
- `Rate: BlockSizes` generic parameter to `const RATE: usize` ([#849])
1215

1316
[#849]: https://github.com/RustCrypto/hashes/pull/849
17+
[#855]: https://github.com/RustCrypto/hashes/pull/855
1418

1519
## 0.1.1 (2026-04-19)
1620
### Fixed

cshake/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ pub type CShake128 = CShake<168>;
2828
/// cSHAKE256 hasher.
2929
pub type CShake256 = CShake<136>;
3030

31+
/// cSHAKE128 XOF reader.
32+
pub type CShake128Reader = CShakeReader<168>;
33+
/// cSHAKE256 XOF reader.
34+
pub type CShake256Reader = CShakeReader<136>;
35+
3136
/// cSHAKE hasher generic over rate.
3237
///
3338
/// Rate MUST be either 168 or 136 for cSHAKE128 and cSHAKE256 respectively.
@@ -186,7 +191,7 @@ impl<const RATE: usize> Drop for CShake<RATE> {
186191
#[cfg(feature = "zeroize")]
187192
impl<const RATE: usize> digest::zeroize::ZeroizeOnDrop for CShake<RATE> {}
188193

189-
/// Generic cSHAKE XOF reader
194+
/// cSHAKE XOF reader generic over rate.
190195
#[derive(Clone)]
191196
pub struct CShakeReader<const RATE: usize> {
192197
state: State1600,

0 commit comments

Comments
 (0)