aboutsummaryrefslogtreecommitdiffstats
path: root/behex_upper.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-10 17:10:20 +0100
committerMattias Andrée <maandree@kth.se>2019-02-10 17:11:30 +0100
commit32a5ae4e65844615cb3e32aaefcdb7abe4af54c9 (patch)
tree0ecfa02766944f2568b184d8d5a8ba0edc71425f /behex_upper.c
parentUse lowest bits rather than highest bits in complete byte, document this, and add tests (diff)
downloadlibsha2-32a5ae4e65844615cb3e32aaefcdb7abe4af54c9.tar.gz
libsha2-32a5ae4e65844615cb3e32aaefcdb7abe4af54c9.tar.bz2
libsha2-32a5ae4e65844615cb3e32aaefcdb7abe4af54c9.tar.xz
Add HMAC and use void * instead of char * for binary data
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--behex_upper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/behex_upper.c b/behex_upper.c
index 29e5f91..cfcee75 100644
--- a/behex_upper.c
+++ b/behex_upper.c
@@ -10,8 +10,9 @@
* @param n The size of `hashsum`
*/
void
-libsha2_behex_upper(char *restrict output, const char *restrict hashsum, size_t n)
+libsha2_behex_upper(char *restrict output, const void *restrict hashsum_, size_t n)
{
+ const unsigned char *restrict hashsum = hashsum_;
output[2 * n] = '\0';
while (n--) {
output[2 * n + 0] = "0123456789ABCDEF"[(hashsum[n] >> 4) & 15];