started with experimental pk export writer

This commit is contained in:
TLINDEN
2014-02-07 20:07:30 +01:00
parent 607f2be281
commit 2d7a0d834c
6 changed files with 117 additions and 2 deletions

View File

@@ -7,7 +7,6 @@ extern "C" {
#include "pcp/base85.h"
#include "pcp/buffer.h"
#include "pcp/config.h"
#include "pcp/crypto.h"
#include "pcp/defines.h"
#include "pcp/digital_crc32.h"

View File

@@ -94,4 +94,16 @@ uint64_t buffer_last64(Buffer *b);
/* read from a file directly into a buffer object */
size_t buffer_fd_read(Buffer *b, FILE *in, size_t len);
/* write numbers as binary into the buffer */
void buffer_add8(Buffer *b, uint8_t v);
void buffer_add16(Buffer *b, uint16_t v);
void buffer_add32(Buffer *b, uint32_t v);
void buffer_add64(Buffer *b, uint64_t v);
/* the same, but convert to big-endian before doing so */
void buffer_add16be(Buffer *b, uint16_t v);
void buffer_add32be(Buffer *b, uint32_t v);
void buffer_add64be(Buffer *b, uint64_t v);
#endif // HAVE_PCP_BUFFER_H

View File

@@ -89,6 +89,8 @@ typedef unsigned int qbyte; /* Quad byte = 32 bits */
/* used for self encryption only */
#define PBP_COMPAT_SALT "qa~t](84z<1t<1oz:ik.@IRNyhG=8q(on9}4#!/_h#a7wqK{Nt$T?W>,mt8NqYq&6U<GB1$,<$j>,rSYI2GRDd:Bcm"
#define PCP_RFC_CIPHER 0x21 /* curve25519+ed25519+poly1305+salsa20+blake2 */
/* error handling */
extern char *PCP_ERR;
extern byte PCP_ERRSET;

View File

@@ -38,6 +38,7 @@
#include "uthash.h"
#include "jenhash.h"
#include "scrypt.h"
#include "buffer.h"
/*
PCP private key structure. Most fields are self explanatory.