pull/1/head
Avril 4 years ago
parent c4658fbf3c
commit 8c0154ef92
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -86,7 +86,7 @@
#+BEGIN_SRC c
char* buffer = alloca(length+1);
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.
printf("Kana hash: %s\n", buffer);

@ -42,8 +42,7 @@ impl Digest {
return d;
}
}
let from = [from[1]];
d.1 = Self::new(&from[..]).0;
d.1 = Self::new(&from[1..]).0;
}
d
}

Loading…
Cancel
Save