File size: 850 Bytes
f0f4f2b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #ifndef __DC_KEYRING_H__
#define __DC_KEYRING_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "dc_key.h"
typedef struct _dc_keyring dc_keyring_t;
/**
* Library-internal.
*/
struct _dc_keyring
{
/** @privatesection */
dc_key_t** keys; /**< Keys in the keyring. Only pointers to keys, the caller is responsible for freeing them and should make sure, the pointers are valid as long as the keyring is valid. */
int count;
int allocated;
};
dc_keyring_t* dc_keyring_new ();
void dc_keyring_unref();
void dc_keyring_add (dc_keyring_t*, dc_key_t*); /* the reference counter of the key is increased by one */
int dc_keyring_load_self_private_for_decrypting(dc_keyring_t*, const char* self_addr, dc_sqlite3_t* sql);
#ifdef __cplusplus
} /* /extern "C" */
#endif
#endif /* __DC_KEYRING_H__ */
|