safe

Password protected secret keeper
git clone git://git.z3bra.org/safe.git
Log | Files | Refs | README | LICENSE

commit 45b41bd255d96e2a9afd05814847b3e9e033c877
parent 47a560952b5e4cee67d3b7769659767a217654a3
Author: z3bra <contactatz3bradotorg>
Date:   Thu, 23 May 2019 12:11:07 +0200

Remove unneeded functions/headers

Diffstat:
safe.c | 25-------------------------
1 file changed, 0 insertions(+), 25 deletions(-)

diff --git a/safe.c b/safe.c @@ -13,7 +13,6 @@ #include <sodium.h> #include "arg.h" -#include "queue.h" #include "readpassphrase.h" #define CKSIZE 4096 @@ -32,24 +31,6 @@ usage(void) exit(1); } -void -str2bin(char *s, uint8_t *d, size_t size) -{ - size_t i; - - for (i = 0; i < size; i++, s += 2) - sscanf(s, "%2hhx", &d[i]); -} - -void -bin2str(uint8_t *d, char *s, size_t size) -{ - size_t i; - - for (i = 0; i < size; i++, s += 2) - sprintf(s, "%02x", d[i]); -} - char * dirname(char *path) { @@ -148,12 +129,6 @@ readpass(const char *prompt, uint8_t **target, uint32_t *len) } void -hash(uint8_t *buf, size_t size, uint8_t *md, size_t mdsize) -{ - crypto_generichash(md, mdsize, buf, size, NULL, 0); -} - -void deriv(char *pw, uint8_t *salt, uint8_t *key, size_t ks) { if (crypto_pwhash(key, ks, pw, strlen(pw),