aboutsummaryrefslogtreecommitdiffstats
path: root/test.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-12 18:46:12 +0100
committerMattias Andrée <maandree@kth.se>2019-02-12 18:46:12 +0100
commit47139985115e175ed9c3f7d648d6d9ec7c48b89b (patch)
tree846111020e7a2bb3bcd85cf00ceb158d07dc0c28 /test.c
parentUpdate makefile (diff)
downloadlibkeccak-47139985115e175ed9c3f7d648d6d9ec7c48b89b.tar.gz
libkeccak-47139985115e175ed9c3f7d648d6d9ec7c48b89b.tar.bz2
libkeccak-47139985115e175ed9c3f7d648d6d9ec7c48b89b.tar.xz
Deprecate libkeccak_{state,hmac}_{unmarshal_skip,marshal_size} and replace with the functions without the _skip or _size suffix
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'test.c')
-rw-r--r--test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test.c b/test.c
index 059a9eb..020e045 100644
--- a/test.c
+++ b/test.c
@@ -8,7 +8,7 @@
/**
- * Test functions in <libkeccak/hex.h>
+ * Test hexdecimal-coding functions
*
* @return Zero on success, -1 on error
*/
@@ -62,7 +62,7 @@ test_hex(void)
/**
- * Test functions in <libkeccak/state.h>
+ * Test state functions
*
* @param spec The specifications for the state
* @return Zero on success, -1 on error
@@ -96,7 +96,7 @@ test_state(struct libkeccak_spec *restrict spec)
return -1;
}
- marshal_size = libkeccak_state_marshal_size(state2);
+ marshal_size = libkeccak_state_marshal(state2, NULL);
marshalled_data = malloc(marshal_size);
if (!marshalled_data) {
perror("malloc");
@@ -126,8 +126,8 @@ test_state(struct libkeccak_spec *restrict spec)
return -1;
}
- if (libkeccak_state_unmarshal_skip(marshalled_data) != marshal_size) {
- printf("libkeccak_state_unmarshal_skip returned an unexpected value.\n");
+ if (libkeccak_state_unmarshal(NULL, marshalled_data) != marshal_size) {
+ printf("libkeccak_state_unmarshal(NULL, .) returned an unexpected value.\n");
return -1;
}