CRC: GetHash32MBS

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

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
Calculates some special Hash value.
Example
MsgBox hex(GetHash32MBS("xskin-b013fafit_01-PELVIS-BODY.skn")) // should show 67A53A4D

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)
{

intlength = inString[0];
UInt32hash = length + 1;
inti;

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.


💬 Ask a question or report a problem