From 17a989db6c4d42828f68afed20bafcb377c65cfb Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Fri, 28 Dec 2018 13:41:25 -0500 Subject: allow specifying the info parameter for the HKDF --- tests/test_sas.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test_sas.cpp') diff --git a/tests/test_sas.cpp b/tests/test_sas.cpp index bbb43d8..3578244 100644 --- a/tests/test_sas.cpp +++ b/tests/test_sas.cpp @@ -55,8 +55,8 @@ olm_sas_set_their_key(alice_sas, pubkey, olm_sas_pubkey_length(alice_sas)); std::uint8_t alice_bytes[6]; std::uint8_t bob_bytes[6]; -olm_sas_generate_bytes(alice_sas, alice_bytes, 6); -olm_sas_generate_bytes(bob_sas, bob_bytes, 6); +olm_sas_generate_bytes(alice_sas, "SAS", 3, alice_bytes, 6); +olm_sas_generate_bytes(bob_sas, "SAS", 3, bob_bytes, 6); assert_equals(alice_bytes, bob_bytes, 6); @@ -108,8 +108,8 @@ olm_sas_set_their_key(alice_sas, pubkey, olm_sas_pubkey_length(alice_sas)); std::uint8_t alice_mac[olm_sas_mac_length(alice_sas)]; std::uint8_t bob_mac[olm_sas_mac_length(bob_sas)]; -olm_sas_calculate_mac(alice_sas, (void *) "Hello world!", 12, alice_mac, olm_sas_mac_length(alice_sas)); -olm_sas_calculate_mac(bob_sas, (void *) "Hello world!", 12, bob_mac, olm_sas_mac_length(bob_sas)); +olm_sas_calculate_mac(alice_sas, (void *) "Hello world!", 12, "MAC", 3, alice_mac, olm_sas_mac_length(alice_sas)); +olm_sas_calculate_mac(bob_sas, (void *) "Hello world!", 12, "MAC", 3, bob_mac, olm_sas_mac_length(bob_sas)); assert_equals(alice_mac, bob_mac, olm_sas_mac_length(alice_sas)); -- cgit v1.2.3