Thumbnail Hash (How is it created)
#10
Okee dokee.. figured it out:

C# Code:
Code:
public string Hash(string input)
{
    uint m_crc = 0xffffffff;
    System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
    bytes = encoding.GetBytes(input.ToLower());
    foreach (byte myByte in bytes)
    {
        m_crc ^= ((uint)(myByte) << 24);
        for (int i = 0; i < 8; i++)
        {
            if ((System.Convert.ToUInt32(m_crc) & 0x80000000) == 0x80000000)
            {
                m_crc = (m_crc << 1) ^ 0x04C11DB7;
            }
            else
            {
                m_crc <<= 1;
            }
        }
    }
    return String.Format("{0:x8}", m_crc);
}

123456789 returns 0376e6e7
F:\Videos\Nosferatu.avi returns 2a6ec78d
smb://user:pass@server/share/directory/ returns c5559f13
smb://user:pass@server/share/directory/file.ext returns 8ce36055

Remember:
1) When hashing remote shares, use the path as displayed in the sources.xml file, which can include the username and password.
2) When hashing directories for thumbnails, include the final slash.

Hopefully, this will help someone find a specific thumbnail easier :)


Messages In This Thread
[No subject] - by jmarshall - 2007-02-25, 23:45
[No subject] - by chunk_1970 - 2007-02-26, 04:12
Totally Lost - by ticklemeozmo - 2007-03-24, 21:30
[No subject] - by chunk_1970 - 2007-03-24, 21:52
[No subject] - by ticklemeozmo - 2007-03-24, 22:25
[No subject] - by chunk_1970 - 2007-03-24, 22:35
[No subject] - by ticklemeozmo - 2007-03-24, 22:52
[No subject] - by chunk_1970 - 2007-03-24, 23:00
Solved! - by ticklemeozmo - 2007-11-11, 19:15
Logout Mark Read Team Forum Stats Members Help
Thumbnail Hash (How is it created)2