summaryrefslogtreecommitdiff
path: root/libs/libsignal/src/sender_key_record.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-26 13:06:41 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-26 13:06:41 +0300
commitaec8f049d43d79c6c8c26a7d9ddfd9460d267275 (patch)
tree5e75220de26fda9b7b0527d550204c78a86ad90c /libs/libsignal/src/sender_key_record.h
parentf2764176c58829d24fee7a830a3c9ac2b57d1906 (diff)
libaxolotl doesn't exist anymore, it's renamed to libsignal
Diffstat (limited to 'libs/libsignal/src/sender_key_record.h')
-rw-r--r--libs/libsignal/src/sender_key_record.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/libs/libsignal/src/sender_key_record.h b/libs/libsignal/src/sender_key_record.h
new file mode 100644
index 0000000000..f1113ceb62
--- /dev/null
+++ b/libs/libsignal/src/sender_key_record.h
@@ -0,0 +1,33 @@
+#ifndef SENDER_KEY_RECORD_H
+#define SENDER_KEY_RECORD_H
+
+#include "signal_protocol_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int sender_key_record_create(sender_key_record **record,
+ signal_context *global_context);
+int sender_key_record_serialize(signal_buffer **buffer, sender_key_record *record);
+int sender_key_record_deserialize(sender_key_record **record, const uint8_t *data, size_t len, signal_context *global_context);
+int sender_key_record_copy(sender_key_record **record, sender_key_record *other_state, signal_context *global_context);
+
+int sender_key_record_is_empty(sender_key_record *record);
+int sender_key_record_get_sender_key_state(sender_key_record *record, sender_key_state **state);
+int sender_key_record_get_sender_key_state_by_id(sender_key_record *record, sender_key_state **state, uint32_t key_id);
+int sender_key_record_add_sender_key_state(sender_key_record *record,
+ uint32_t id, uint32_t iteration, signal_buffer *chain_key, ec_public_key *signature_key);
+int sender_key_record_set_sender_key_state(sender_key_record *record,
+ uint32_t id, uint32_t iteration, signal_buffer *chain_key, ec_key_pair *signature_key_pair);
+
+signal_buffer *sender_key_record_get_user_record(const sender_key_record *record);
+void sender_key_record_set_user_record(sender_key_record *record, signal_buffer *user_record);
+
+void sender_key_record_destroy(signal_type_base *type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* SENDER_KEY_RECORD_H */