⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hashtest.c

📁 This general hash alogorithm implementation. This code has expamle for hash implementaio for 16bit t
💻 C
字号:
/* ************************************************************************** *                                                                        * *           General Purpose Hash Function Algorithms Test                * *                                                                        * * Author: Arash Partow - 2002                                            * * URL: http://www.partow.net                                             * * URL: http://www.partow.net/programming/hashfunctions/index.html        * *                                                                        * * Copyright notice:                                                      * * Free use of the General Purpose Hash Function Algorithms Library is    * * permitted under the guidelines and in accordance with the most current * * version of the Common Public License.                                  * * http://www.opensource.org/licenses/cpl.php                             * *                                                                        * ***************************************************************************/#include <stdio.h>#include <stdlib.h>#include "GeneralHashFunctions.h"int main(int argc, char* argv[]){   char* key = "abcdefghijklmnopqrstuvwxyz1234567890";   printf("General Purpose Hash Function Algorithms Test\n");   printf("By Arash Partow - 2002         \n");   printf("Key:                         %s\n",key);   printf(" 1. RS-Hash Function Value:   %u\n",RSHash(key,36));   printf(" 2. JS-Hash Function Value:   %u\n",JSHash(key,36));   printf(" 3. PJW-Hash Function Value:  %u\n",PJWHash(key,36));   printf(" 4. ELF-Hash Function Value:  %u\n",ELFHash(key,36));   printf(" 5. BKDR-Hash Function Value: %u\n",BKDRHash(key,36));   printf(" 6. SDBM-Hash Function Value: %u\n",SDBMHash(key,36));   printf(" 7. DJB-Hash Function Value:  %u\n",DJBHash(key,36));   printf(" 8. DEK-Hash Function Value:  %u\n",DEKHash(key,36));   printf(" 9. BP-Hash Function Value:   %u\n",BPHash(key,36));   printf("10. FNV-Hash Function Value:  %u\n",FNVHash(key,36));   printf("11. AP-Hash Function Value:   %u\n",APHash(key,36));   exit(EXIT_SUCCESS);   return 1;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -