Created
May 16, 2011 12:33
-
-
Save ngn999/974368 to your computer and use it in GitHub Desktop.
hash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = reinterpret_cast<const unsigned char *>(szKey); | |
while (*p) { | |
res = (res << 7) + (res >> 25) + *p++; | |
} | |
// 相当于,res这个int32将前面8位移到后面去了, eg. 1101001xxxxxxxxxxxxx,就成了,xxxxxxxxxxxxx110100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment