From 444ef1f70687c340ba1b0b2a22d6e63c734d5f9e Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 20 May 2016 11:59:31 +0100 Subject: Prefix for internal symbols Give a load of internal symbols "_olm_" prefixes. This better delineates the public and private interfaces in the module, and helps avoid internal symbols leaking out and possibly being abused. --- src/session.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/session.cpp') diff --git a/src/session.cpp b/src/session.cpp index 0d9b58a..19b9f21 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -35,11 +35,11 @@ static const olm::KdfInfo OLM_KDF_INFO = { RATCHET_KDF_INFO, sizeof(RATCHET_KDF_INFO) - 1 }; -const olm_cipher *get_cipher() { - static olm_cipher *cipher; - static olm_cipher_aes_sha_256 OLM_CIPHER; +const _olm_cipher *get_cipher() { + static _olm_cipher *cipher; + static _olm_cipher_aes_sha_256 OLM_CIPHER; if (!cipher) { - cipher = olm_cipher_aes_sha_256_init( + cipher = _olm_cipher_aes_sha_256_init( &OLM_CIPHER, CIPHER_KDF_INFO, sizeof(CIPHER_KDF_INFO) - 1 ); @@ -216,7 +216,7 @@ std::size_t olm::Session::session_id( pos = olm::store_array(pos, alice_identity_key.public_key); pos = olm::store_array(pos, alice_base_key.public_key); pos = olm::store_array(pos, bob_one_time_key.public_key); - crypto_sha256(tmp, sizeof(tmp), id); + _olm_crypto_sha256(tmp, sizeof(tmp), id); return session_id_length(); } -- cgit v1.2.3