mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Change CSipHasher's count variable to uint8_t
This commit is contained in:
parent
564e1ab0f3
commit
812037cb80
2 changed files with 2 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ CSipHasher& CSipHasher::Write(const unsigned char* data, size_t size)
|
|||
{
|
||||
uint64_t v0 = v[0], v1 = v[1], v2 = v[2], v3 = v[3];
|
||||
uint64_t t = tmp;
|
||||
int c = count;
|
||||
uint8_t c = count;
|
||||
|
||||
while (size--) {
|
||||
t |= ((uint64_t)(*(data++))) << (8 * (c % 8));
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class CSipHasher
|
|||
private:
|
||||
uint64_t v[4];
|
||||
uint64_t tmp;
|
||||
int count;
|
||||
uint8_t count; // Only the low 8 bits of the input size matter.
|
||||
|
||||
public:
|
||||
/** Construct a SipHash calculator initialized with 128-bit key (k0, k1) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue