|
|
@ -86,7 +86,7 @@
|
|
|
|
#+BEGIN_SRC c
|
|
|
|
#+BEGIN_SRC c
|
|
|
|
char* buffer = alloca(length+1);
|
|
|
|
char* buffer = alloca(length+1);
|
|
|
|
assert(khash_do(&ctx, input_data, strlen(input_data), buffer, length) == KHASH_SUCCESS, "khash_do() failed.");
|
|
|
|
assert(khash_do(&ctx, input_data, strlen(input_data), buffer, length) == KHASH_SUCCESS, "khash_do() failed.");
|
|
|
|
buffer[length] = 0; // Ensure we have a NUL terminator.
|
|
|
|
buffer[length+1] = 0; // Ensure we have a NUL terminator.
|
|
|
|
|
|
|
|
|
|
|
|
setlocale(LC_ALL, ""); //Ensure we can print UTF-8.
|
|
|
|
setlocale(LC_ALL, ""); //Ensure we can print UTF-8.
|
|
|
|
printf("Kana hash: %s\n", buffer);
|
|
|
|
printf("Kana hash: %s\n", buffer);
|
|
|
|