Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::AccountArchive Struct Reference

Crypto material contained in the archive, not persisted in the account configuration. More...

#include <accountarchive.h>

Collaboration diagram for jami::AccountArchive:
Collaboration graph

Public Member Functions

 AccountArchive ()=default
 
 AccountArchive (const std::filesystem::path &path, std::string_view scheme={}, const std::string &pwd={})
 
 AccountArchive (const std::vector< uint8_t > &data, const std::vector< uint8_t > &password_salt={})
 
 AccountArchive (std::string_view data, const std::vector< uint8_t > &password_salt={})
 
void deserialize (std::string_view data, const std::vector< uint8_t > &salt)
 Deserialize archive from memory.
 
void load (const std::filesystem::path &path, std::string_view scheme, const std::string &pwd)
 Load archive from file, optionally encrypted with provided password.
 
bool save (const std::filesystem::path &path, std::string_view scheme, const std::string &password) const
 Save archive to file, optionally encrypted with provided password.
 
std::string serialize () const
 Serialize structured archive data to memory.
 

Public Attributes

std::shared_ptr< dht::crypto::PrivateKey > ca_key
 Generated CA key (for self-signed certificates)
 
std::map< std::string, std::string > config
 Account configuration.
 
std::map< dht::InfoHash, Contactcontacts
 Contacts.
 
std::map< std::string, ConvInfoconversations
 
std::map< std::string, ConversationRequestconversationsRequests
 
std::vector< uint8_teth_key
 Ethereum private key.
 
dht::crypto::Identity id
 Account main private key and certificate chain.
 
std::vector< uint8_tpassword_salt
 Salt for the archive encryption password.
 
std::shared_ptr< dht::crypto::RevocationList > revoked
 Revoked devices.
 

Detailed Description

Crypto material contained in the archive, not persisted in the account configuration.

Definition at line 35 of file accountarchive.h.

Constructor & Destructor Documentation

◆ AccountArchive() [1/4]

jami::AccountArchive::AccountArchive ( )
default

◆ AccountArchive() [2/4]

jami::AccountArchive::AccountArchive ( const std::vector< uint8_t > &  data,
const std::vector< uint8_t > &  password_salt = {} 
)
inline

Definition at line 63 of file accountarchive.h.

◆ AccountArchive() [3/4]

jami::AccountArchive::AccountArchive ( std::string_view  data,
const std::vector< uint8_t > &  password_salt = {} 
)
inline

Definition at line 67 of file accountarchive.h.

◆ AccountArchive() [4/4]

jami::AccountArchive::AccountArchive ( const std::filesystem::path &  path,
std::string_view  scheme = {},
const std::string &  pwd = {} 
)
inline

Definition at line 71 of file accountarchive.h.

Member Function Documentation

◆ deserialize()

◆ load()

void jami::AccountArchive::load ( const std::filesystem::path &  path,
std::string_view  scheme,
const std::string &  pwd 
)
inline

Load archive from file, optionally encrypted with provided password.

Definition at line 85 of file accountarchive.h.

References deserialize(), jami::emitSignal(), and jami::fileutils::readArchive().

Here is the call graph for this function:

◆ save()

bool jami::AccountArchive::save ( const std::filesystem::path &  path,
std::string_view  scheme,
const std::string &  password 
) const
inline

Save archive to file, optionally encrypted with provided password.

Definition at line 92 of file accountarchive.h.

References password_salt, serialize(), and jami::fileutils::writeArchive().

Referenced by jami::ArchiveAccountManager::changePassword(), and jami::ArchiveAccountManager::exportArchive().

Here is the call graph for this function:

◆ serialize()

std::string jami::AccountArchive::serialize ( ) const

Serialize structured archive data to memory.

Definition at line 113 of file accountarchive.cpp.

Referenced by save().

Member Data Documentation

◆ ca_key

std::shared_ptr<dht::crypto::PrivateKey> jami::AccountArchive::ca_key

Generated CA key (for self-signed certificates)

Definition at line 41 of file accountarchive.h.

Referenced by deserialize().

◆ config

std::map<std::string, std::string> jami::AccountArchive::config

Account configuration.

Definition at line 57 of file accountarchive.h.

Referenced by deserialize().

◆ contacts

std::map<dht::InfoHash, Contact> jami::AccountArchive::contacts

Contacts.

Definition at line 50 of file accountarchive.h.

Referenced by deserialize().

◆ conversations

std::map<std::string, ConvInfo> jami::AccountArchive::conversations

Definition at line 53 of file accountarchive.h.

Referenced by deserialize().

◆ conversationsRequests

std::map<std::string, ConversationRequest> jami::AccountArchive::conversationsRequests

Definition at line 54 of file accountarchive.h.

Referenced by deserialize().

◆ eth_key

std::vector<uint8_t> jami::AccountArchive::eth_key

Ethereum private key.

Definition at line 47 of file accountarchive.h.

Referenced by deserialize().

◆ id

dht::crypto::Identity jami::AccountArchive::id

Account main private key and certificate chain.

Definition at line 38 of file accountarchive.h.

Referenced by jami::ArchiveAccountManager::revokeDevice().

◆ password_salt

std::vector<uint8_t> jami::AccountArchive::password_salt

Salt for the archive encryption password.


Definition at line 60 of file accountarchive.h.

Referenced by deserialize(), and save().

◆ revoked

std::shared_ptr<dht::crypto::RevocationList> jami::AccountArchive::revoked

Revoked devices.

Definition at line 44 of file accountarchive.h.

Referenced by deserialize(), and jami::ArchiveAccountManager::revokeDevice().


The documentation for this struct was generated from the following files: