creditsdb.cpp File Reference

Implementation of CreditsDb and Credits classes. More...

#include <hn/hnprec.h>
#include "creditsdb.h"
#include "ed2k.h"
#include <hn/utils.h>
#include "cryptopp.h"
#include <boost/filesystem/operations.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/key_extractors.hpp>
#include <boost/multi_index/ordered_index.hpp>

Go to the source code of this file.


namespace  Detail


typedef CreditsList::nth_index<
ID_Id >::type::iterator 
typedef CreditsList::nth_index<
ID_PubKey >::type::iterator 
typedef CryptoPP::RSASSA_PKCS1v15_SHA_Signer Signer
typedef CryptoPP::RSASSA_PKCS1v15_SHA_Verifier Verifier


enum  ED2K_ClientsMet { CM_VER = 0x11, CM_VER29 = 0x12 }
 Tags used in clients.met file. More...
enum  CreditsListKeys { ID_Id, ID_Hash, ID_PubKey, ID_LastSeen }


std::ostream & operator<< (std::ostream &o, const Credits &c)


const unsigned int ED2K_MaxKeySize = 80
 The constant-size space alloted to saving keys in credits.met files (v29+).
boost::shared_ptr< Signers_signer
 SecIdent: Signer.
boost::shared_ptr< Verifiers_verifier
 SecIdent: Verifier.

Detailed Description

Implementation of CreditsDb and Credits classes.

Definition in file creditsdb.cpp.

Typedef Documentation

typedef CreditsList::nth_index<ID_Id >::type::iterator Detail::IDIter

Definition at line 121 of file creditsdb.cpp.

typedef CreditsList::nth_index<ID_PubKey>::type::iterator Detail::KeyIter

Definition at line 123 of file creditsdb.cpp.

typedef CryptoPP::RSASSA_PKCS1v15_SHA_Signer Signer

Definition at line 130 of file creditsdb.cpp.

typedef CryptoPP::RSASSA_PKCS1v15_SHA_Verifier Verifier

Definition at line 131 of file creditsdb.cpp.

Enumeration Type Documentation

enum ED2K_ClientsMet

Tags used in clients.met file.

Enumeration values:
CM_VER  Old version - no RSA pub key.
CM_VER29  New version (eMule 0.29+), with RSA key.

Definition at line 34 of file creditsdb.cpp.

enum CreditsListKeys

Enumeration values:

Definition at line 120 of file creditsdb.cpp.

Function Documentation

std::ostream& operator<< std::ostream &  o,
const Credits c

Definition at line 80 of file creditsdb.cpp.

References ED2K_MaxKeySize.

Variable Documentation

const unsigned int ED2K_MaxKeySize = 80

The constant-size space alloted to saving keys in credits.met files (v29+).

Definition at line 40 of file creditsdb.cpp.

Referenced by Credits::Credits(), and operator<<().

boost::shared_ptr<Signer> s_signer

SecIdent: Signer.

Definition at line 132 of file creditsdb.cpp.

Referenced by CreditsDb::createSignature(), and CreditsDb::loadCryptKey().

boost::shared_ptr<Verifier> s_verifier

SecIdent: Verifier.

Definition at line 133 of file creditsdb.cpp.

Referenced by CreditsDb::loadCryptKey().