aboutsummaryrefslogtreecommitdiff
path: root/include/libnpass
diff options
context:
space:
mode:
Diffstat (limited to 'include/libnpass')
-rw-r--r--include/libnpass/gpg.h6
-rw-r--r--include/libnpass/libnpass.h7
-rw-r--r--include/libnpass/util.h5
3 files changed, 18 insertions, 0 deletions
diff --git a/include/libnpass/gpg.h b/include/libnpass/gpg.h
new file mode 100644
index 0000000..f5053bf
--- /dev/null
+++ b/include/libnpass/gpg.h
@@ -0,0 +1,6 @@
+#include <stdio.h>
+#include <sys/types.h>
+
+int gpg_key_validate(const char *fpr);
+int gpg_decrypt(FILE *pass_out, const char *pass_path);
+int gpg_encrypt(FILE *stream, const char *fpr, const char *pass, size_t n);
diff --git a/include/libnpass/libnpass.h b/include/libnpass/libnpass.h
new file mode 100644
index 0000000..d4b7fb4
--- /dev/null
+++ b/include/libnpass/libnpass.h
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int pass_init(const char *fpr);
+int pass_cat(FILE *out, const char *path);
+int pass_add(const char *path, const char *pass, size_t n);
+int pass_rm(const char *path);
+ssize_t pass_getpass(char **lineptr, size_t *n, FILE *stream);
diff --git a/include/libnpass/util.h b/include/libnpass/util.h
new file mode 100644
index 0000000..ebe97b1
--- /dev/null
+++ b/include/libnpass/util.h
@@ -0,0 +1,5 @@
+#include <stdlib.h>
+
+int r_mkdir(const char *path, mode_t mode);
+int r_rmdir(const char *prefix_path, char *rm_path);
+void util_strtrim(char *s);