mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
724 B
39 lines
724 B
9 years ago
|
#ifndef FAMILY_H__
|
||
9 years ago
|
#define FAMILY_H__
|
||
9 years ago
|
|
||
|
#include <map>
|
||
|
#include <string>
|
||
|
#include <memory>
|
||
|
#include "Signature.h"
|
||
9 years ago
|
#include "Identity.h"
|
||
9 years ago
|
|
||
|
namespace i2p
|
||
|
{
|
||
|
namespace data
|
||
|
{
|
||
|
class Families
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
Families ();
|
||
|
~Families ();
|
||
|
void LoadCertificates ();
|
||
9 years ago
|
bool VerifyFamily (const std::string& family, const IdentHash& ident,
|
||
|
const char * signature, const char * key = nullptr);
|
||
9 years ago
|
|
||
|
private:
|
||
|
|
||
|
void LoadCertificate (const std::string& filename);
|
||
|
|
||
|
private:
|
||
|
|
||
|
std::map<std::string, std::shared_ptr<i2p::crypto::Verifier> > m_SigningKeys;
|
||
|
};
|
||
9 years ago
|
|
||
|
std::string CreateFamilySignature (const std::string& family, const IdentHash& ident);
|
||
|
// return base64 signature of empty string in case of failure
|
||
9 years ago
|
}
|
||
|
}
|
||
|
|
||
|
#endif
|