mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-16 19:40:57 +01:00
del unused funcs, rename blob2sig
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user