summaryrefslogtreecommitdiffstats
path: root/PICA_id.h
diff options
context:
space:
mode:
Diffstat (limited to 'PICA_id.h')
-rw-r--r--PICA_id.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/PICA_id.h b/PICA_id.h
new file mode 100644
index 0000000..538d0fd
--- /dev/null
+++ b/PICA_id.h
@@ -0,0 +1,22 @@
+
+#ifndef PICA_ID_H
+#define PICA_ID_H
+
+#include <openssl/sha.h>
+#include <openssl/x509.h>
+
+#define PICA_ID_SIZE SHA224_DIGEST_LENGTH
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+int PICA_id_from_X509(X509 *x, unsigned char *id);
+
+unsigned char *PICA_id_from_base64(const unsigned char *buf, unsigned char *id);
+char *PICA_id_to_base64(const unsigned char *id, char *buf);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif \ No newline at end of file