summaryrefslogtreecommitdiff
path: root/usr/src/test/crypto-tests/tests/digest/parser_runner.h
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-05-26 13:57:13 +0000
committerJohn Levon <john.levon@joyent.com>2020-05-26 13:57:13 +0000
commit5b2acc0949194447bba6e45a0fa44d0b5f42f208 (patch)
tree7ea9eb87bc68fee386dd39035ce715e87a0e673c /usr/src/test/crypto-tests/tests/digest/parser_runner.h
parent8ca018083101bf1cb175869679bc123187fb1bab (diff)
parent2a1277d3064386cd5c4e372301007aa330bf1d5e (diff)
downloadillumos-joyent-gcc9.tar.gz
mergegcc9
Diffstat (limited to 'usr/src/test/crypto-tests/tests/digest/parser_runner.h')
-rw-r--r--usr/src/test/crypto-tests/tests/digest/parser_runner.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/usr/src/test/crypto-tests/tests/digest/parser_runner.h b/usr/src/test/crypto-tests/tests/digest/parser_runner.h
new file mode 100644
index 0000000000..3a7b47a545
--- /dev/null
+++ b/usr/src/test/crypto-tests/tests/digest/parser_runner.h
@@ -0,0 +1,39 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License (), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2020 Oxide Computer Company
+ */
+
+#ifndef _PARSER_RUNNER_H_
+#define _PARSER_RUNNER_H_
+
+#include <sys/types.h>
+
+struct parser_ctx;
+
+struct parser_entry {
+ uchar_t *pe_msg;
+ size_t pe_msglen;
+ uchar_t *pe_hash;
+};
+
+typedef struct parser_ctx parser_ctx_t;
+typedef struct parser_entry parser_entry_t;
+
+parser_ctx_t *parser_init(const char *, size_t, int *);
+void parser_fini(parser_ctx_t *);
+parser_entry_t *parser_read(parser_ctx_t *, int *);
+void parser_free(parser_entry_t *);
+
+int digest_runner(char *, const char *, size_t);
+
+#endif /* _PARSER_RUNNER_H_ */