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