After some research into C++, I have managed to implement the first of the two functions, and it looks as though I can still implement the hash without the other (and probably a bit more efficiently, at that). Anyway, if anybody has suggestions on how I can improve the function, please tell me! I tested it, and it is functional, at least.
- void strToInt(const char* str,int len,long& num) // big endian
-
{
-
num=(long)0;
-
for(int i=0;i<len;++i)
-
{
-
num<<=8;
-
num+=(long)str[i];
-
}
-
}
Keep in mind that the long type is arbitrarily long, thanks to "#define long RossiBigInt"
PS: Why did thescripts get rid of syntax highlighting?