diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2018-12-28 13:41:25 -0500 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2018-12-28 13:41:25 -0500 |
commit | 17a989db6c4d42828f68afed20bafcb377c65cfb (patch) | |
tree | de29380ff1ecd0ad17e7134caab8c1054fbb9667 /tests | |
parent | ded55f50536d852b544c7255551fc3b8c1e7b044 (diff) |
allow specifying the info parameter for the HKDF
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_sas.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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)); |