Change ulong to uchar in hash method.