I'm working on a project that involves programming the Java hashCode() hashing function,
the formula.
The input strings (i.e. "A Adding trigger unit C") were randomly generated and stored in a .txt file. Also if the result hash is not within a range (0 < hash < N), it needs to be adjusted => hash % N).
I'm having trouble with the hashCode() algorithm, since the result for just one char of the string is too large (i.e. 1.408 * 10^30) to be stored in a regular variable. I've tried using some libraries that allow you to store very big numbers, but none of them allow you to do the mod operation, if the hash exceeds the N parameter.
Please, what solution would you recommend for me so I could store these very long numbers + use the mod operation on them.
Thanks