@@ -247,7 +247,7 @@ impl SipHasher128 {
247
247
for i in 0 ..BUFFER_CAPACITY {
248
248
let elem = self . buf . get_unchecked ( i) . assume_init ( ) . to_le ( ) ;
249
249
self . state . v3 ^= elem;
250
- Sip24Rounds :: c_rounds ( & mut self . state ) ;
250
+ Sip13Rounds :: c_rounds ( & mut self . state ) ;
251
251
self . state . v0 ^= elem;
252
252
}
253
253
@@ -327,7 +327,7 @@ impl SipHasher128 {
327
327
for i in 0 ..last {
328
328
let elem = self . buf . get_unchecked ( i) . assume_init ( ) . to_le ( ) ;
329
329
self . state . v3 ^= elem;
330
- Sip24Rounds :: c_rounds ( & mut self . state ) ;
330
+ Sip13Rounds :: c_rounds ( & mut self . state ) ;
331
331
self . state . v0 ^= elem;
332
332
}
333
333
@@ -340,7 +340,7 @@ impl SipHasher128 {
340
340
for _ in 0 ..elems_left {
341
341
let elem = ( msg. as_ptr ( ) . add ( processed) as * const u64 ) . read_unaligned ( ) . to_le ( ) ;
342
342
self . state . v3 ^= elem;
343
- Sip24Rounds :: c_rounds ( & mut self . state ) ;
343
+ Sip13Rounds :: c_rounds ( & mut self . state ) ;
344
344
self . state . v0 ^= elem;
345
345
processed += ELEM_SIZE ;
346
346
}
@@ -368,7 +368,7 @@ impl SipHasher128 {
368
368
for i in 0 ..last {
369
369
let elem = unsafe { self . buf . get_unchecked ( i) . assume_init ( ) . to_le ( ) } ;
370
370
state. v3 ^= elem;
371
- Sip24Rounds :: c_rounds ( & mut state) ;
371
+ Sip13Rounds :: c_rounds ( & mut state) ;
372
372
state. v0 ^= elem;
373
373
}
374
374
@@ -392,15 +392,15 @@ impl SipHasher128 {
392
392
let b: u64 = ( ( length as u64 & 0xff ) << 56 ) | elem;
393
393
394
394
state. v3 ^= b;
395
- Sip24Rounds :: c_rounds ( & mut state) ;
395
+ Sip13Rounds :: c_rounds ( & mut state) ;
396
396
state. v0 ^= b;
397
397
398
398
state. v2 ^= 0xee ;
399
- Sip24Rounds :: d_rounds ( & mut state) ;
399
+ Sip13Rounds :: d_rounds ( & mut state) ;
400
400
let _0 = state. v0 ^ state. v1 ^ state. v2 ^ state. v3 ;
401
401
402
402
state. v1 ^= 0xdd ;
403
- Sip24Rounds :: d_rounds ( & mut state) ;
403
+ Sip13Rounds :: d_rounds ( & mut state) ;
404
404
let _1 = state. v0 ^ state. v1 ^ state. v2 ^ state. v3 ;
405
405
406
406
( _0, _1)
@@ -477,20 +477,18 @@ impl Hasher for SipHasher128 {
477
477
}
478
478
479
479
#[ derive( Debug , Clone , Default ) ]
480
- struct Sip24Rounds ;
480
+ struct Sip13Rounds ;
481
481
482
- impl Sip24Rounds {
482
+ impl Sip13Rounds {
483
483
#[ inline]
484
484
fn c_rounds ( state : & mut State ) {
485
485
compress ! ( state) ;
486
- compress ! ( state) ;
487
486
}
488
487
489
488
#[ inline]
490
489
fn d_rounds ( state : & mut State ) {
491
490
compress ! ( state) ;
492
491
compress ! ( state) ;
493
492
compress ! ( state) ;
494
- compress ! ( state) ;
495
493
}
496
494
}
0 commit comments