summaryrefslogtreecommitdiff
path: root/libs/libaxolotl/src/sender_key_state.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-01-26 08:28:32 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-01-26 08:28:32 +0000
commit2a82a9154f9d6e0b5658c82cd346051017339a1e (patch)
tree8321c2d1897d4026e68064241014eef4a57ddc9d /libs/libaxolotl/src/sender_key_state.h
parent80148955f82c205cc94f0112e0fbfe8f91bc4330 (diff)
libaxolotl - initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@16169 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'libs/libaxolotl/src/sender_key_state.h')
-rw-r--r--libs/libaxolotl/src/sender_key_state.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/libs/libaxolotl/src/sender_key_state.h b/libs/libaxolotl/src/sender_key_state.h
new file mode 100644
index 0000000000..117afa43be
--- /dev/null
+++ b/libs/libaxolotl/src/sender_key_state.h
@@ -0,0 +1,34 @@
+#ifndef SENDER_KEY_STATE_H
+#define SENDER_KEY_STATE_H
+
+#include <stdint.h>
+#include "axolotl_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int sender_key_state_create(sender_key_state **state,
+ uint32_t id, sender_chain_key *chain_key,
+ ec_public_key *signature_public_key, ec_private_key *signature_private_key,
+ axolotl_context *global_context);
+int sender_key_state_serialize(axolotl_buffer **buffer, sender_key_state *state);
+int sender_key_state_deserialize(sender_key_state **state, const uint8_t *data, size_t len, axolotl_context *global_context);
+int sender_key_state_copy(sender_key_state **state, sender_key_state *other_state, axolotl_context *global_context);
+
+uint32_t sender_key_state_get_key_id(sender_key_state *state);
+sender_chain_key *sender_key_state_get_chain_key(sender_key_state *state);
+void sender_key_state_set_chain_key(sender_key_state *state, sender_chain_key *chain_key);
+ec_public_key *sender_key_state_get_signing_key_public(sender_key_state *state);
+ec_private_key *sender_key_state_get_signing_key_private(sender_key_state *state);
+int sender_key_state_has_sender_message_key(sender_key_state *state, uint32_t iteration);
+int sender_key_state_add_sender_message_key(sender_key_state *state, sender_message_key *message_key);
+sender_message_key *sender_key_state_remove_sender_message_key(sender_key_state *state, uint32_t iteration);
+
+void sender_key_state_destroy(axolotl_type_base *type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* SENDER_KEY_STATE_H */