AdvancedLauncher.SDK.Management.FileSystemManager.FileHash C# (CSharp) Метод

FileHash() публичный Метод

Calculates file hash (internal file ID). Is is hash function over the game path (not the file itself).
public FileHash ( string filePath ) : uint
filePath string File path
Результат uint
        public uint FileHash(string filePath)
        {
            uint result = 5381;
            int HASH_TRANS_SIZE = 0x400, charIndex = 0, len;
            byte charCode;

            len = filePath.Length;
            if (len >= HASH_TRANS_SIZE) {
                return 0;
            }
            filePath = filePath.ToLower();

            if (len > 0) {
                while (charIndex < len) {
                    charCode = (byte)filePath[charIndex];
                    if (charCode != 46 && charCode != 92) {
                        result = charCode + 33 * result;
                    }
                    ++charIndex;
                }
            }

            return result;
        }