summaryrefslogtreecommitdiff
path: root/examples/06-all
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2024-04-29 18:31:10 -0400
committerPaul Duncan <pabs@pablotron.org>2024-04-29 18:31:10 -0400
commit5e1d35c63378a8e509287e49aca3566a08fdcf1d (patch)
treea69b7cb2ed4e52dbd00c67f39dcbb403f5122093 /examples/06-all
parente4fca8572a8b07a2ebf2fd933572118c4962ffd9 (diff)
downloadsha3-5e1d35c63378a8e509287e49aca3566a08fdcf1d.tar.bz2
sha3-5e1d35c63378a8e509287e49aca3566a08fdcf1d.zip
examples/06-all/all-fns.c: add sha3_backend() example
Diffstat (limited to 'examples/06-all')
-rw-r--r--examples/06-all/all-fns.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/06-all/all-fns.c b/examples/06-all/all-fns.c
index 1aea4d6..f533559 100644
--- a/examples/06-all/all-fns.c
+++ b/examples/06-all/all-fns.c
@@ -1489,6 +1489,16 @@ static void k12_xof_example(void) {
///! [k12_xof]
}
+static void sha3_backend_example(void) {
+ ///! [sha3_backend]
+ // get backend name
+ const char *backend = sha3_backend();
+
+ // print backend name to stdout
+ printf("%s: backend=%s\n", __func__, backend);
+ ///! [sha3_backend]
+}
+
int main(void) {
sha3_224_example();
sha3_224_absorb_example();
@@ -1543,6 +1553,7 @@ int main(void) {
k12_once_example();
k12_custom_once_example();
k12_xof_example();
+ sha3_backend_example();
return 0;
}