Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char chars[256];
- //strcpy(chars, pGameEntry->GetFileName());
- strcpy(chars, "smb://USER:pass@server/share/Directory/");
- DevMsg("Chars are: %s\n", chars);
- DevMsg("In hex, that's: %x\n", (unsigned int) chars);
- // Convert to lowercase
- int i = 0;
- while(chars[i] != '\n')
- {
- chars[i] = tolower(chars[i]);
- i++;
- }
- DevMsg("That's %s in lowercase.\n", chars);
- // Guess: Start with a full mask?
- unsigned int m_crc = 0xffffffff;
- i = 0;
- while(input[i])
- {
- c = input[i];
- m_crc ^= ((unsigned int) c << 24);
- for (int a = 0; a < 8; a++)
- {
- if( ((unsigned int) c & 0x80000000) == 0x80000000 )
- m_crc = (m_crc << 1) ^ 0x04C11DB7;
- else
- m_crc <<= 1;
- }
- i++;
- }
- char xbmc_file_hash[256];
- strcpy( xbmc_file_hash, VarArgs("%x", m_crc) );
- // strcpy(marqueeFile, this->FindImage(pGameEntry, "", VarArgs("%sVideo/%s%s", xbmc_thumbnails_folder, xbmc_file_hash[0], xbmc_file_hash), "marquees"));
- DevMsg("Hash is: %s\n", xbmc_file_hash);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement