标签:分享 track rac 卡巴斯基 技术 cpp amp ica post
#include<stdio.h> #include <stdlib.h> unsigned int SDBMHash(char *str) { unsigned int hash = 0; while (*str) { // equivalent to: hash = 65599*hash + (*str++); hash = (*str++) + (hash << 6) + (hash << 16) - hash; } return (hash & 0x7FFFFFFF); } //哈希用于SHA256加密 哈希仅仅能加密无法解密 还运用于卡巴斯基病毒库的源代码中,应用广,功能<span style="font-family: Arial, Helvetica, sans-serif;">很强大</span> void main() { printf("%u", SDBMHash("rocket")); printf("\n%u", SDBMHash("rocket")); printf("\n%u", SDBMHash("zrf-rocket")); printf("\n%u",SDBMHash("黑鹰")); getchar(); }
标签:分享 track rac 卡巴斯基 技术 cpp amp ica post
原文地址:http://www.cnblogs.com/liguangsunls/p/7159915.html