aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-08-19 17:18:09 +0100
committerMark Haines <mark.haines@matrix.org>2015-08-19 17:32:06 +0100
commitb3180551851d6f736a98eb059d5b46b0872666e2 (patch)
treeeab45e085474fe190d9a87d16ed284a407d96925 /tests
parenta378a40b3a139b789b00d778c1091a0818c4a8ad (diff)
Replace hard coded references to the 32-byte key length with a constant, add utilities for copying data to and from fixed sized arrays
Diffstat (limited to 'tests')
-rw-r--r--tests/test_base64.cpp1
-rw-r--r--tests/test_crypto.cpp2
2 files changed, 1 insertions, 2 deletions
diff --git a/tests/test_base64.cpp b/tests/test_base64.cpp
index e6b3710..5bae2f9 100644
--- a/tests/test_base64.cpp
+++ b/tests/test_base64.cpp
@@ -33,5 +33,4 @@ olm::decode_base64(input, input_length, output);
assert_equals(expected_output, output, output_length);
}
-
}
diff --git a/tests/test_crypto.cpp b/tests/test_crypto.cpp
index b3ff593..4606c52 100644
--- a/tests/test_crypto.cpp
+++ b/tests/test_crypto.cpp
@@ -70,7 +70,7 @@ olm::curve25519_generate_key(bob_private, bob_pair);
assert_equals(bob_private, bob_pair.private_key, 32);
assert_equals(bob_public, bob_pair.public_key, 32);
-std::uint8_t actual_agreement[olm::CURVE25519_SHARED_SECRET_LENGTH] = {};
+std::uint8_t actual_agreement[olm::KEY_LENGTH] = {};
olm::curve25519_shared_secret(alice_pair, bob_pair, actual_agreement);