File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -246,14 +246,27 @@ macro_rules! impl_turbo_shake {
246
246
impl $name {
247
247
/// Creates a new TurboSHAKE instance with the given domain separation.
248
248
/// Note that the domain separation needs to be a byte with a value in
249
- /// the range [0x01, . . . , 0x7F]
249
+ /// the range [0x01, . . . , 0x7F].
250
250
pub fn new( domain_separation: u8 ) -> Self {
251
251
assert!( ( 0x01 ..=0x7F ) . contains( & domain_separation) ) ;
252
252
Self {
253
253
domain_separation,
254
254
state: Sha3State :: new( TURBO_SHAKE_ROUND_COUNT ) ,
255
255
}
256
256
}
257
+
258
+ /// Creates a new TurboSHAKE instance with the given domain separation
259
+ /// and round_count.
260
+ /// This is a low-level "hazmat" API.
261
+ /// Note that the domain separation needs to be a byte with a value in
262
+ /// the range [0x01, . . . , 0x7F].
263
+ pub fn new_with_round_count( domain_separation: u8 , round_count: usize ) -> Self {
264
+ assert!( ( 0x01 ..=0x7F ) . contains( & domain_separation) ) ;
265
+ Self {
266
+ domain_separation,
267
+ state: Sha3State :: new( round_count) ,
268
+ }
269
+ }
257
270
}
258
271
259
272
impl HashMarker for $name { }
You can’t perform that action at this time.
0 commit comments