diff options
author | Mattias Andrée <maandree@kth.se> | 2019-02-10 17:10:20 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2019-02-10 17:11:30 +0100 |
commit | 32a5ae4e65844615cb3e32aaefcdb7abe4af54c9 (patch) | |
tree | 0ecfa02766944f2568b184d8d5a8ba0edc71425f /unmarshal.c | |
parent | Use lowest bits rather than highest bits in complete byte, document this, and add tests (diff) | |
download | libsha2-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 'unmarshal.c')
-rw-r--r-- | unmarshal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unmarshal.c b/unmarshal.c index 909bdc2..2876f31 100644 --- a/unmarshal.c +++ b/unmarshal.c @@ -11,8 +11,9 @@ * @return The number of read bytes, 0 on failure */ size_t -libsha2_unmarshal(struct libsha2_state *restrict state, const char *restrict buf, size_t bufsize) +libsha2_unmarshal(struct libsha2_state *restrict state, const void *restrict buf_, size_t bufsize) { + const char *restrict buf = buf_; size_t off = 0; if (bufsize < sizeof(int) + sizeof(enum libsha2_algorithm) + sizeof(size_t)) { |