abandoned yaml, perl and c key exporters, added json exporter using libjansson, enable with --with-json

This commit is contained in:
TLINDEN
2015-07-06 23:02:04 +02:00
parent 325493189d
commit 57517a1000
21 changed files with 267 additions and 309 deletions

View File

@@ -74,3 +74,12 @@ void _dump(char *n, byte *d, size_t s) {
}
fprintf(stderr, "\n");
}
char *_bin2hex(byte *bin, size_t len) {
char *out = malloc((len*2) + 1);
size_t i;
for(i=0; i<len; ++i)
sprintf(&out[i*2], "%02x", bin[i]);
out[len*2] = '\0';
return out;
}