summaryrefslogtreecommitdiff
path: root/examples/01-shake128
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2024-02-24 01:39:05 -0500
committerPaul Duncan <pabs@pablotron.org>2024-02-24 01:39:05 -0500
commit4f3afe29e01b6d31ee260d171a15b15bbf24a0cd (patch)
tree6d74dd7416e1cdba9da8abdbb36903a6e6811386 /examples/01-shake128
parent9698bdb0c0ff37799494f3f901ab99ede4125583 (diff)
downloadsha3-4f3afe29e01b6d31ee260d171a15b15bbf24a0cd.tar.bz2
sha3-4f3afe29e01b6d31ee260d171a15b15bbf24a0cd.zip
examples: update examples for new shake{128,256} prototypes
Diffstat (limited to 'examples/01-shake128')
-rw-r--r--examples/01-shake128/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/01-shake128/main.c b/examples/01-shake128/main.c
index f2a2347..54b8e3b 100644
--- a/examples/01-shake128/main.c
+++ b/examples/01-shake128/main.c
@@ -2,18 +2,18 @@
// shake128-example: hash contents of DATA with SHAKE128 and print first
// 200 bytes of SHAKE128 hash of data to standard output.
//
-#include <stdint.h>
-#include <stdio.h>
-#include "hex.h"
-#include "sha3.h"
+#include <stdint.h> // uint8_t
+#include <stdio.h> // printf()
+#include "hex.h" // hex_write()
+#include "sha3.h" // shake128()
// test data
static const uint8_t DATA[] = "this is some test data";
-int main() {
+int main(void) {
// hash data
uint8_t buf[200] = { 0 };
- shake128_xof_once(DATA, sizeof(DATA), buf, sizeof(buf));
+ shake128(DATA, sizeof(DATA), buf, sizeof(buf));
// print result to stdout
printf("SHAKE128 (200 bytes): ");