mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 12:00:56 +01:00
put previously global error handling and key hashes into ptx (pcp context) to make libpcp threadsafe.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "helpers++.h"
|
||||
#include "buffer++.h"
|
||||
#include "ptx++.h"
|
||||
|
||||
namespace pcp {
|
||||
|
||||
@@ -39,12 +40,14 @@ namespace pcp {
|
||||
|
||||
public:
|
||||
pcp_pubkey_t *K;
|
||||
PcpContext PTX;
|
||||
|
||||
// constructors
|
||||
PubKey(PcpContext P);
|
||||
PubKey();
|
||||
PubKey(pcp_pubkey_t *k);
|
||||
PubKey(pcp_pubkey_t *k, bool store);
|
||||
PubKey(std::string &z85encoded);
|
||||
PubKey(PcpContext P, pcp_pubkey_t *k);
|
||||
PubKey(PcpContext P, pcp_pubkey_t *k, bool store);
|
||||
PubKey(PcpContext P, std::string &z85encoded);
|
||||
|
||||
// destructors
|
||||
~PubKey();
|
||||
@@ -72,17 +75,19 @@ namespace pcp {
|
||||
public:
|
||||
// make access to the underlying struct easier
|
||||
pcp_key_t *K;
|
||||
PcpContext PTX;
|
||||
|
||||
// constructors
|
||||
Key();
|
||||
Key(bool generate);
|
||||
Key(const std::string& passphrase);
|
||||
Key(const std::string& passphrase,
|
||||
Key(PcpContext P);
|
||||
Key(PcpContext P, bool generate);
|
||||
Key(PcpContext P, const std::string& passphrase);
|
||||
Key(PcpContext P, const std::string& passphrase,
|
||||
const std::string& owner,
|
||||
const std::string& mail);
|
||||
Key(pcp_key_t *k);
|
||||
Key(pcp_key_t *k, bool store);
|
||||
Key(std::string &z85encoded, std::string& passphrase);
|
||||
Key(PcpContext P, pcp_key_t *k);
|
||||
Key(PcpContext P, pcp_key_t *k, bool store);
|
||||
Key(PcpContext P, std::string &z85encoded, std::string& passphrase);
|
||||
|
||||
// destructor
|
||||
~Key();
|
||||
|
||||
Reference in New Issue
Block a user