diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-06-11 15:57:45 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-06-11 15:57:45 +0100 |
commit | e44c82a7b4f108086d7d6d203bb129745cd67fc6 (patch) | |
tree | ef42e676cde0f5f26a07a89a0629ebf079343cb9 /tests | |
parent | 816435a86097a6609cb6e5ad422083bc49b19632 (diff) |
Add encoder and decoder for PreKey messages
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_message.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_message.cpp b/tests/test_message.cpp index 9c0ab4a..b46b15a 100644 --- a/tests/test_message.cpp +++ b/tests/test_message.cpp @@ -17,8 +17,8 @@ int main() { -std::uint8_t message1[36] = "\x03\n\nratchetkey\x10\x01\"\nciphertexthmacsha2"; -std::uint8_t message2[36] = "\x03\x10\x01\n\nratchetkey\"\nciphertexthmacsha2"; +std::uint8_t message1[36] = "\x03\x10\x01\n\nratchetkey\"\nciphertexthmacsha2"; +std::uint8_t message2[36] = "\x03\n\nratchetkey\x10\x01\"\nciphertexthmacsha2"; std::uint8_t ratchetkey[11] = "ratchetkey"; std::uint8_t ciphertext[11] = "ciphertext"; std::uint8_t hmacsha2[9] = "hmacsha2"; @@ -31,6 +31,7 @@ axolotl::MessageReader reader; axolotl::decode_message(reader, message1, 35, 8); assert_equals(std::uint8_t(3), reader.version); +assert_equals(true, reader.has_counter); assert_equals(std::uint32_t(1), reader.counter); assert_equals(std::size_t(10), reader.ratchet_key_length); assert_equals(std::size_t(10), reader.ciphertext_length); |