mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
I2P -> .NET
This commit is contained in:
parent
f176f1909b
commit
fdb0ce6703
272 changed files with 5702 additions and 8931 deletions
38
libdotnet/Family.h
Normal file
38
libdotnet/Family.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef FAMILY_H__
|
||||
#define FAMILY_H__
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include "Signature.h"
|
||||
#include "Identity.h"
|
||||
|
||||
namespace dotnet
|
||||
{
|
||||
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);
|
||||
|
||||
private:
|
||||
|
||||
void LoadCertificate (const std::string& filename);
|
||||
|
||||
private:
|
||||
|
||||
std::map<std::string, std::shared_ptr<dotnet::crypto::Verifier> > m_SigningKeys;
|
||||
};
|
||||
|
||||
std::string CreateFamilySignature (const std::string& family, const IdentHash& ident);
|
||||
// return base64 signature of empty string in case of failure
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue