aboutsummaryrefslogtreecommitdiff
path: root/include/olm/ratchet.hh
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2016-09-05 10:42:09 +0100
committerGitHub <noreply@github.com>2016-09-05 10:42:09 +0100
commit057ab15c1a9bd6e09b31955e840861151b5ad69e (patch)
tree140b55571972ddf76c28515ec767ac01a5e21712 /include/olm/ratchet.hh
parent2aad4cfa860e33228372d525b4bc6a8bcdfbb8f6 (diff)
parent69f269ffaf88515f6d5c0b34178bf0096cf5773b (diff)
Merge pull request #14 from matrix-org/rav/convert_crypto_to_c
Convert crypto.hh into C-compatible interface
Diffstat (limited to 'include/olm/ratchet.hh')
-rw-r--r--include/olm/ratchet.hh14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/olm/ratchet.hh b/include/olm/ratchet.hh
index e91d634..2e87e35 100644
--- a/include/olm/ratchet.hh
+++ b/include/olm/ratchet.hh
@@ -13,7 +13,9 @@
* limitations under the License.
*/
-#include "olm/crypto.hh"
+#include <cstdint>
+
+#include "olm/crypto.h"
#include "olm/list.hh"
#include "olm/error.h"
@@ -41,19 +43,19 @@ struct MessageKey {
struct SenderChain {
- Curve25519KeyPair ratchet_key;
+ _olm_curve25519_key_pair ratchet_key;
ChainKey chain_key;
};
struct ReceiverChain {
- Curve25519PublicKey ratchet_key;
+ _olm_curve25519_public_key ratchet_key;
ChainKey chain_key;
};
struct SkippedMessageKey {
- Curve25519PublicKey ratchet_key;
+ _olm_curve25519_public_key ratchet_key;
MessageKey message_key;
};
@@ -108,14 +110,14 @@ struct Ratchet {
* remote's first ratchet key */
void initialise_as_bob(
std::uint8_t const * shared_secret, std::size_t shared_secret_length,
- Curve25519PublicKey const & their_ratchet_key
+ _olm_curve25519_public_key const & their_ratchet_key
);
/** Initialise the session using a shared secret and the public/private key
* pair for the first ratchet key */
void initialise_as_alice(
std::uint8_t const * shared_secret, std::size_t shared_secret_length,
- Curve25519KeyPair const & our_ratchet_key
+ _olm_curve25519_key_pair const & our_ratchet_key
);
/** The number of bytes of output the encrypt method will write for