Hello
I have a very old app that uses a little function that calculates a value and after that i get the hash code of that value, that it's used as a password to unlock some functionalities to the user. Now the manager has a 64 bits computer and the function returns a different value.
What i need it's how to convert this function from C# to Vb, i know that I can use the converts, but they don't work, pointers...
c# Code:
public static unsafe int GetHashCode32(string s) { fixed (char* str = s.ToCharArray()) { char* chPtr = str; int num = 0x15051505; int num2 = num; int* numPtr = (int*)chPtr; for (int i = s.Length; i > 0; i -= 4) { num = (((num << 5) + num) + (num >> 0x1b)) ^ numPtr[0]; if (i <= 2) { break; } num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ numPtr[1]; numPtr += 2; } return (num + (num2 * 0x5d588b65)); } }
Can I convert this function?
