catched up api changes, fixed dysfunctional c++ signature api, enhanced c++ Buf class.

This commit is contained in:
TLINDEN
2014-02-16 15:29:19 +01:00
parent 1342fa2b45
commit 3f03f97992
7 changed files with 62 additions and 49 deletions

View File

@@ -31,6 +31,7 @@
#include "key++.h"
#include "sign++.h"
#include "helpers++.h"
#include "buffer++.h"
namespace pcp {
@@ -42,8 +43,8 @@ namespace pcp {
PubKey P;
Key S;
Vault vault;
unsigned char *sig;
PubKey Signedby;
Buf sig;
// constructors
Signature(Key &skey); // sign only
@@ -56,13 +57,14 @@ namespace pcp {
// PK signature methods
// sender pubkey is P
unsigned char *sign(std::vector<unsigned char> message);
unsigned char *sign(unsigned char *message, size_t mlen);
unsigned char *sign(Pcpstream *message);
bool sign(std::vector<unsigned char> message);
bool sign(unsigned char *message, size_t mlen);
bool sign(Pcpstream *message);
// verify using P or use vault if defined
bool verify(std::vector<unsigned char> message);
bool verify(unsigned char *signature, size_t mlen);
bool verify(Buf _sig);
};
};