del unused funcs, rename blob2sig

This commit is contained in:
Thomas von Dein
2016-10-21 10:04:46 +02:00
parent b8008d1207
commit cb654bd48f
2 changed files with 4 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
/*
This file is part of Pretty Curved Privacy (pcp1).
Copyright (C) 2013-2014 T.v.Dein.
Copyright (C) 2013-2016 T.v.Dein.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,16 +35,11 @@
#define PCP_RAW_KEYSIGSIZE sizeof(pcp_keysig_t) - sizeof(UT_hash_handle)
pcp_keysig_t *keysig2be(pcp_keysig_t *s);
pcp_keysig_t *keysig2native(pcp_keysig_t *s);
/* put a keysig into a buffer, convert to big endian while at it */
Buffer *pcp_keysig2blob(pcp_keysig_t *s);
/* fetch a keysig from a buffer, usually loaded from vault */
pcp_keysig_t *pcp_keysig_new(Buffer *blob);
pcp_keysig_t *pcp_blob2keysig(Buffer *blob);
/* debug print a keysig */
void pcp_dumpkeysig(pcp_keysig_t *s);

View File

@@ -22,16 +22,6 @@
#include "keysig.h"
pcp_keysig_t * keysig2be(pcp_keysig_t *s) {
_32towire(s->size, (byte *)&s->size);
return s;
}
pcp_keysig_t *keysig2native(pcp_keysig_t *s) {
s->size = _wireto32((byte *)&s->size);
return s;
}
Buffer *pcp_keysig2blob(pcp_keysig_t *s) {
Buffer *b = buffer_new(256, "keysig2blob");
buffer_add8(b, s->type);
@@ -42,7 +32,8 @@ Buffer *pcp_keysig2blob(pcp_keysig_t *s) {
return b;
}
pcp_keysig_t *pcp_keysig_new(Buffer *blob) {
pcp_keysig_t *pcp_blob2keysig(Buffer *blob) {
pcp_keysig_t *sk = ucmalloc(sizeof(pcp_keysig_t));
uint8_t type = buffer_get8(blob);