4 #include "base/cl_sysdep.h"
7 #include "integer/cl_I.h"
14 unsigned long hashcode (const cl_I& x)
16 var unsigned long code = 0x814BE3A5;
17 // We walk through all limbs. It may take some time for very large
18 // integers, but it's better than completely ignoring some limbs.
20 #if (cl_value_len <= intLsize)
22 #elif (cl_word_size==64)
28 var const uintD* MSDptr;
30 BN_to_NDS_nocopy(x, MSDptr=,len=,);
31 for (; len > 0; len--) {
32 var uintD c = msprefnext(MSDptr);
33 code = (code << 5) | (code >> 27); // rotate left 5 bits
34 code += (long)c << 16;