aboutsummaryrefslogtreecommitdiff
path: root/include/libnpass
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-04-09 22:24:15 +0530
committersinanmohd <sinan@sinanmohd.com>2024-04-09 22:25:30 +0530
commit4fcff492c978e1d355373978170dac5ebdef26cd (patch)
treee9092427f6a0a3995ee970f7b2b842efecab2f5c /include/libnpass
parentd926dd0ae80ab3823c5d0d4ee024353b28a4412f (diff)
pass/ls: init
Diffstat (limited to 'include/libnpass')
-rw-r--r--include/libnpass/libnpass.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libnpass/libnpass.h b/include/libnpass/libnpass.h
index ac7423a..130954d 100644
--- a/include/libnpass/libnpass.h
+++ b/include/libnpass/libnpass.h
@@ -1,4 +1,6 @@
#include <stdio.h>
+#include <dirent.h>
+#include <linux/limits.h>
typedef enum {
PASS_GEN_DIGIT = 0,
@@ -6,6 +8,24 @@ typedef enum {
PASS_GEN_GRAPH = 2,
} pass_gen_t;
+typedef enum {
+ PASS_STORE_DIR = 0,
+ PASS_STORE_ENC = 1,
+ PASS_STORE_INV = 2,
+} pass_store_t;
+
+struct store {
+ char name[NAME_MAX];
+ pass_store_t type;
+};
+
+DIR *openstore(const char *spath);
+int readstore(DIR *dirp, struct store *s);
+int readstore_all(const char *path, struct store **stor);
+
+pass_store_t pass_store_type(const char *spath);
+int pass_store_cmp(const void *vp1, const void *vp2);
+
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);