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_t * | wickr_storage_keys_create (wickr_cipher_key_t *local, wickr_cipher_key_t *remote)
wickr_storage_keys_t * | wickr_storage_keys_copy (const wickr_storage_keys_t *source)
wickr_storage_keys_t * | wickr_storage_keys_create_from_buffer (const wickr_buffer_t *buffer)
wickr_buffer_t * | wickr_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

  source | the 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

  local | see 'wickr_storage_keys' property documentation
  remote | see '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

  buffer | a 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

  keys | a 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

  keys | the 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) |