Platforms to show: All Mac Windows Linux Cross-Platform
GetHash32MBS(s as string) as UInt32
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
global method | Encryption and Hash | MBS Util Plugin | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The 255 char limit was in the original C function, but should be resolved for this plugin, so string longer than 255 chars will work.
The original C code looks like this:
static UInt32 GetHash32 (StringPtr inString)
{
int | length = inString[0]; | ||
UInt32 | hash = length + 1; | ||
int | i; |
for (i = 1; i <= length; i++)
{
hash = __rlwinm(hash, 3, 0, 31) ^ tolower(inString[i]);
}
return hash;
}
Originally this was added for Cherie Benoit, which describes it like this:
"GetHash32MBS" duplicates the hashing function of Westlake
Interactive's "Namer" application which creates LFN-style short
filenames for use with the Macintosh version of "The Sims."
The items on this page are in the following plugins: MBS Util Plugin.