i2pd/libi2pd/Family.h

39 lines
724 B
C
Raw Normal View History

2016-02-18 23:57:43 +03:00
#ifndef FAMILY_H__
2016-02-21 04:20:19 +03:00
#define FAMILY_H__
2016-02-18 23:57:43 +03:00
#include <map>
#include <string>
#include <memory>
#include "Signature.h"
#include "Identity.h"
2016-02-18 23:57:43 +03:00
namespace i2p
{
namespace data
{
class Families
{
public:
Families ();
~Families ();
void LoadCertificates ();
bool VerifyFamily (const std::string& family, const IdentHash& ident,
const char * signature, const char * key = nullptr);
2016-02-18 23:57:43 +03:00
private:
void LoadCertificate (const std::string& filename);
private:
std::map<std::string, std::shared_ptr<i2p::crypto::Verifier> > m_SigningKeys;
};
2016-02-21 04:20:19 +03:00
std::string CreateFamilySignature (const std::string& family, const IdentHash& ident);
// return base64 signature of empty string in case of failure
2016-02-18 23:57:43 +03:00
}
}
#endif