mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-22 20:59:45 -04:00
GxsMail: Implemented RSA mail receiving
RsGxsMailBaseItem::deserialize(...) fix offset calculation RsGxsMailItem::serialize(...) fix offset calculation RsGxsMailBaseItem initialize cryptoType to UNDEFINED_ENCRYPTION p3IdService::decryptData(...) implemented multi id variant RsGixs::*cryptData(...) proper param order p3IdService::*cryptData(...) proper param order
This commit is contained in:
parent
54a0f87369
commit
1f1f4ded02
8 changed files with 260 additions and 45 deletions
|
@ -103,7 +103,7 @@ typedef PGPIdType RsPgpId;
|
|||
class RsGixs
|
||||
{
|
||||
public:
|
||||
|
||||
// TODO: cleanup this should be an enum!
|
||||
static const uint32_t RS_GIXS_ERROR_NO_ERROR = 0x0000 ;
|
||||
static const uint32_t RS_GIXS_ERROR_UNKNOWN = 0x0001 ;
|
||||
static const uint32_t RS_GIXS_ERROR_KEY_NOT_AVAILABLE = 0x0002 ;
|
||||
|
@ -119,8 +119,17 @@ public:
|
|||
virtual bool signData(const uint8_t *data,uint32_t data_size,const RsGxsId& signer_id,RsTlvKeySignature& signature,uint32_t& signing_error) = 0 ;
|
||||
virtual bool validateData(const uint8_t *data,uint32_t data_size,const RsTlvKeySignature& signature,bool force_load,const RsIdentityUsage& info,uint32_t& signing_error) = 0 ;
|
||||
|
||||
virtual bool encryptData(const uint8_t *clear_data,uint32_t clear_data_size,uint8_t *& encrypted_data,uint32_t& encrypted_data_size,const RsGxsId& encryption_key_id,bool force_load,uint32_t& encryption_error) = 0 ;
|
||||
virtual bool decryptData(const uint8_t *encrypted_data,uint32_t encrypted_data_size,uint8_t *& clear_data,uint32_t& clear_data_size,const RsGxsId& encryption_key_id,uint32_t& encryption_error) = 0 ;
|
||||
virtual bool encryptData( const uint8_t *clear_data,
|
||||
uint32_t clear_data_size,
|
||||
uint8_t *& encrypted_data,
|
||||
uint32_t& encrypted_data_size,
|
||||
const RsGxsId& encryption_key_id,
|
||||
uint32_t& encryption_error, bool force_load) = 0 ;
|
||||
virtual bool decryptData( const uint8_t *encrypted_data,
|
||||
uint32_t encrypted_data_size,
|
||||
uint8_t *& clear_data, uint32_t& clear_data_size,
|
||||
const RsGxsId& encryption_key_id,
|
||||
uint32_t& encryption_error, bool force_load) = 0 ;
|
||||
|
||||
virtual bool getOwnIds(std::list<RsGxsId>& ids) = 0;
|
||||
virtual bool isOwnId(const RsGxsId& key_id) = 0 ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue