|
wickr-crypto-c
|
Data Structures | |
| struct | wickr_key_exchange |
| Public key exchange protected data. After a shared secret is generated using a public key with identifier 'key_id', and run through a KDF, it is used to encrypt data to be protected by the exchange and the ciphertext is stored in 'exchange_ciphertext'. More... | |
Functions | |
| wickr_key_exchange_t * | wickr_key_exchange_create (wickr_buffer_t *exchange_id, uint64_t key_id, wickr_cipher_result_t *exchange_ciphertext) |
| wickr_key_exchange_t * | wickr_key_exchange_copy (const wickr_key_exchange_t *source) |
| void | wickr_key_exchange_destroy (wickr_key_exchange_t **exchange) |
| wickr_exchange_array_t * | wickr_exchange_array_new (uint32_t exchange_count) |
| bool | wickr_exchange_array_set_item (wickr_exchange_array_t *array, uint32_t index, wickr_key_exchange_t *exchange) |
| wickr_key_exchange_t * | wickr_exchange_array_fetch_item (wickr_exchange_array_t *array, uint32_t index) |
| wickr_array_t * | wickr_exchange_array_copy (wickr_exchange_array_t *array) |
| void | wickr_exchange_array_destroy (wickr_exchange_array_t **array) |
| wickr_array_t* wickr_exchange_array_copy | ( | wickr_exchange_array_t * | array | ) |
| array | the array to copy |
| void wickr_exchange_array_destroy | ( | wickr_exchange_array_t ** | array | ) |
| array | a pointer to the array to destroy, all items of '*array' are also destroyed |
| wickr_key_exchange_t* wickr_exchange_array_fetch_item | ( | wickr_exchange_array_t * | array, |
| uint32_t | index | ||
| ) |
Fetch a key exchange from an exchange array
NOTE: Calling this function does not make a copy of the exchange being returned, the array still owns it
| array | the array to fetch 'index' from |
| index | the index to fetch from 'array' |
| wickr_exchange_array_t* wickr_exchange_array_new | ( | uint32_t | exchange_count | ) |
Allocate a new key exchange array
| exchange_count | the number of exchanges the array should hold |
| bool wickr_exchange_array_set_item | ( | wickr_exchange_array_t * | array, |
| uint32_t | index, | ||
| wickr_key_exchange_t * | exchange | ||
| ) |
Set an item in a key exchange array
NOTE: Calling this function does not make a copy of 'exchange', the array simply takes ownership of it
| array | the array to set 'exchange' into |
| index | the location in 'array' to set exchange |
| exchange | the exchange to set at position 'index' in 'array' |
| wickr_key_exchange_t* wickr_key_exchange_copy | ( | const wickr_key_exchange_t * | source | ) |
Copy a key exchange
| source | the key exchange to copy |
| wickr_key_exchange_t* wickr_key_exchange_create | ( | wickr_buffer_t * | exchange_id, |
| uint64_t | key_id, | ||
| wickr_cipher_result_t * | exchange_ciphertext | ||
| ) |
Create a key exchange from properties
| exchange_id | see 'wickr_key_exchange' property documentation property documentation |
| key_id | see 'wickr_key_exchange' property documentation property documentation |
| exchange_ciphertext | see 'wickr_key_exchange' property documentation property documentation |
| void wickr_key_exchange_destroy | ( | wickr_key_exchange_t ** | exchange | ) |
Destroy a key exchange
| exchange | a pointer to the key exchange to destroy. All properties of '*exchange' will also be destroyed |