wickr-crypto-c
Data Structures | Functions
Wickr_storage_keys

Data Structures

struct  wickr_storage_keys
 Key's used for the client to encrypt data meant for itself, and not for other clients. More...
 

Functions

wickr_storage_keys_twickr_storage_keys_create (wickr_cipher_key_t *local, wickr_cipher_key_t *remote)
 
wickr_storage_keys_twickr_storage_keys_copy (const wickr_storage_keys_t *source)
 
wickr_storage_keys_twickr_storage_keys_create_from_buffer (const wickr_buffer_t *buffer)
 
wickr_buffer_twickr_storage_keys_serialize (const wickr_storage_keys_t *keys)
 
void wickr_storage_keys_destroy (wickr_storage_keys_t **keys)
 

Detailed Description

Function Documentation

◆ wickr_storage_keys_copy()

wickr_storage_keys_t* wickr_storage_keys_copy ( const wickr_storage_keys_t source)

Copy a storage key set

Parameters
sourcethe storage key set to copy
Returns
a newly allocated storage key set holding a deep copy of the properties of 'source'

◆ wickr_storage_keys_create()

wickr_storage_keys_t* wickr_storage_keys_create ( wickr_cipher_key_t local,
wickr_cipher_key_t remote 
)

Create a storage key set from components

Parameters
localsee 'wickr_storage_keys' property documentation
remotesee 'wickr_storage_keys' property documentation
Returns
a newly allocated storage key set. Takes ownership of the passed inputs

◆ wickr_storage_keys_create_from_buffer()

wickr_storage_keys_t* wickr_storage_keys_create_from_buffer ( const wickr_buffer_t buffer)

Create a storage key set from a previously serialized storage key set

Parameters
buffera buffer containing the output of 'wickr_storage_keys_serialize'
Returns
a newly allocated storage key set or NULL if parsing fails

◆ wickr_storage_keys_destroy()

void wickr_storage_keys_destroy ( wickr_storage_keys_t **  keys)

Destroy a storage key set

Parameters
keysa pointer to the storage key set to destroy. All properties of '*keys' will also be destroyed

◆ wickr_storage_keys_serialize()

wickr_buffer_t* wickr_storage_keys_serialize ( const wickr_storage_keys_t keys)

Serialize a storage key set to a buffer

Parameters
keysthe keys to serialize
Returns
a buffer containing the properties of storage keys in the following format: | CIPHER_ID (LOCAL) | KEY_DATA (LOCAL) | CIPHER_ID (REMOTE) | KEY_DATA (REMOTE) |