mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-16 01:54:52 -04:00
finished moving tunnel encryption into turtle
This commit is contained in:
parent
00a6bd5b73
commit
58aa2413b3
3 changed files with 109 additions and 67 deletions
|
@ -332,12 +332,11 @@ class p3turtle: public p3Service, public RsTurtle, public p3Config
|
|||
/// Send a data request into the correct tunnel for the given file hash
|
||||
void sendTurtleData(const RsPeerId& virtual_peer_id, RsTurtleGenericTunnelItem *item) ;
|
||||
|
||||
#ifdef TODO
|
||||
/// Encrypts/decrypts an item, using a autenticated construction + chacha20, based on the given 32 bytes master key.
|
||||
/// Input values are not touched (memory is not released). Memory ownership of outputs is left to the client.
|
||||
///
|
||||
static bool encryptItem(const RsItem *item, uint8_t* encryption_master_key, RsTurtleGenericDataItem *& encrypted_item) ;
|
||||
static bool decryptItem(RsTurtleGenericDataItem *item,uint8_t *encryption_master_key,RsItem *& decrypted_item) ;
|
||||
#endif
|
||||
static bool encryptData(const unsigned char *clear_data,uint32_t clear_data_size,uint8_t *encryption_master_key,RsTurtleGenericDataItem *& encrypted_item);
|
||||
static bool decryptItem(const RsTurtleGenericDataItem *item, uint8_t* encryption_master_key, unsigned char *& decrypted_data,uint32_t& decrypted_data_size);
|
||||
|
||||
private:
|
||||
//--------------------------- Admin/Helper functions -------------------------//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue