File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 12
12
#include < stdint.h>
13
13
#include < string>
14
14
#include < vector>
15
+ #include " crypto/common.h"
15
16
16
17
/* * Template base class for fixed-sized opaque blobs. */
17
18
template <unsigned int BITS>
@@ -119,13 +120,10 @@ class uint256 : public base_blob<256> {
119
120
* used when the contents are considered uniformly random. It is not appropriate
120
121
* when the value can easily be influenced from outside as e.g. a network adversary could
121
122
* provide values to trigger worst-case behavior.
122
- * @note The result of this function is not stable between little and big endian.
123
123
*/
124
124
uint64_t GetCheapHash () const
125
125
{
126
- uint64_t result;
127
- memcpy ((void *)&result, (void *)data, 8 );
128
- return result;
126
+ return ReadLE64 (data);
129
127
}
130
128
131
129
/* * A more secure, salted hash function.
You can’t perform that action at this time.
0 commit comments