mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-29 00:33:14 +03:00
21 lines
470 B
C
21 lines
470 B
C
/*
|
|
author: Christian Bender
|
|
This file contains a simple test program for each hash-function.
|
|
*/
|
|
|
|
#include "hash.h"
|
|
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
char s[] = "hello";
|
|
|
|
/* actual tests */
|
|
printf("sdbm: %s --> %llX\n", s, sdbm(s));
|
|
printf("djb2: %s --> %llX\n", s, djb2(s));
|
|
printf("xor8: %s --> %X\n", s, xor8(s)); /* 8 bit */
|
|
printf("adler_32: %s --> %X\n", s, adler_32(s)); /* 32 bit */
|
|
|
|
return 0;
|
|
}
|