aboutsummaryrefslogtreecommitdiff
path: root/src/crypto.cpp
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-05-16 11:53:35 +0100
committerRichard van der Hoff <richard@matrix.org>2016-05-20 15:37:33 +0100
commitc8c5f35bb45db0547ea4c3e1d986051e47ba78d2 (patch)
tree451a45cb890aee1e3e79923a335ffdda04b602f0 /src/crypto.cpp
parentacae4e84386056e80eb4bb633fcdf03375c087ea (diff)
crypto.cpp: Fix comments
These seem to be the wrong way around.
Diffstat (limited to 'src/crypto.cpp')
-rw-r--r--src/crypto.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto.cpp b/src/crypto.cpp
index da1d617..ffe2661 100644
--- a/src/crypto.cpp
+++ b/src/crypto.cpp
@@ -298,14 +298,14 @@ void olm::hkdf_sha256(
salt = HKDF_DEFAULT_SALT;
salt_length = sizeof(HKDF_DEFAULT_SALT);
}
- /* Expand */
+ /* Extract */
hmac_sha256_key(salt, salt_length, hmac_key);
hmac_sha256_init(&context, hmac_key);
::sha256_update(&context, input, input_length);
hmac_sha256_final(&context, hmac_key, step_result);
hmac_sha256_key(step_result, olm::SHA256_OUTPUT_LENGTH, hmac_key);
- /* Extract */
+ /* Expand */
hmac_sha256_init(&context, hmac_key);
::sha256_update(&context, info, info_length);
::sha256_update(&context, &iteration, 1);