diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-26 13:06:41 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-26 13:06:41 +0300 |
commit | aec8f049d43d79c6c8c26a7d9ddfd9460d267275 (patch) | |
tree | 5e75220de26fda9b7b0527d550204c78a86ad90c /libs/libsignal/src/device_consistency.h | |
parent | f2764176c58829d24fee7a830a3c9ac2b57d1906 (diff) |
libaxolotl doesn't exist anymore, it's renamed to libsignal
Diffstat (limited to 'libs/libsignal/src/device_consistency.h')
-rw-r--r-- | libs/libsignal/src/device_consistency.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/libs/libsignal/src/device_consistency.h b/libs/libsignal/src/device_consistency.h new file mode 100644 index 0000000000..379d04471c --- /dev/null +++ b/libs/libsignal/src/device_consistency.h @@ -0,0 +1,60 @@ +#ifndef DEVICE_CONSISTENCY_H +#define DEVICE_CONSISTENCY_H + +#include "signal_protocol_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int device_consistency_signature_create(device_consistency_signature **signature, + const uint8_t *signature_data, size_t signature_len, + const uint8_t *vrf_output_data, size_t vrf_output_len); + +signal_buffer *device_consistency_signature_get_signature(const device_consistency_signature *signature); +signal_buffer *device_consistency_signature_get_vrf_output(const device_consistency_signature *signature); + +void device_consistency_signature_destroy(signal_type_base *type); + +int device_consistency_commitment_create(device_consistency_commitment **commitment, + uint32_t generation, ec_public_key_list *identity_key_list, + signal_context *global_context); + +uint32_t device_consistency_commitment_get_generation(const device_consistency_commitment *commitment); +signal_buffer *device_consistency_commitment_get_serialized(const device_consistency_commitment *commitment); + +void device_consistency_commitment_destroy(signal_type_base *type); + +int device_consistency_message_create_from_pair(device_consistency_message **message, + device_consistency_commitment *commitment, + ec_key_pair *identity_key_pair, + signal_context *global_context); +int device_consistency_message_create_from_serialized(device_consistency_message **message, + device_consistency_commitment *commitment, + const uint8_t *serialized_data, size_t serialized_len, + ec_public_key *identity_key, + signal_context *global_context); + +signal_buffer *device_consistency_message_get_serialized(const device_consistency_message *message); +device_consistency_signature *device_consistency_message_get_signature(const device_consistency_message *message); +uint32_t device_consistency_signature_get_generation(const device_consistency_message *message); + +void device_consistency_message_destroy(signal_type_base *type); + +int device_consistency_code_generate_for(device_consistency_commitment *commitment, + device_consistency_signature_list *signatures, + char **code_string, + signal_context *global_context); + +device_consistency_signature_list *device_consistency_signature_list_alloc(void); +device_consistency_signature_list *device_consistency_signature_list_copy(const device_consistency_signature_list *list); +int device_consistency_signature_list_push_back(device_consistency_signature_list *list, device_consistency_signature *value); +unsigned int device_consistency_signature_list_size(const device_consistency_signature_list *list); +device_consistency_signature *device_consistency_signature_list_at(const device_consistency_signature_list *list, unsigned int index); +void device_consistency_signature_list_free(device_consistency_signature_list *list); + +#ifdef __cplusplus +} +#endif + +#endif /* DEVICE_CONSISTENCY_H */ |