Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Olm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
Olm
Commits
f3c0dd76
Commit
f3c0dd76
authored
8 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
megolm.c: Remove spurious arguments to rehash_part
These were left over from when rehash_part did a bunch of logging.
parent
1b15465c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/megolm.c
+4
-5
4 additions, 5 deletions
src/megolm.c
with
4 additions
and
5 deletions
src/megolm.c
+
4
−
5
View file @
f3c0dd76
...
...
@@ -38,8 +38,7 @@ static uint8_t HASH_KEY_SEEDS[MEGOLM_RATCHET_PARTS][HASH_KEY_SEED_LENGTH] = {
static
void
rehash_part
(
uint8_t
data
[
MEGOLM_RATCHET_PARTS
][
MEGOLM_RATCHET_PART_LENGTH
],
int
rehash_from_part
,
int
rehash_to_part
,
uint32_t
old_counter
,
uint32_t
new_counter
int
rehash_from_part
,
int
rehash_to_part
)
{
_olm_crypto_hmac_sha256
(
data
[
rehash_from_part
],
...
...
@@ -96,7 +95,7 @@ void megolm_advance(Megolm *megolm) {
/* now update R(h)...R(3) based on R(h) */
for
(
i
=
MEGOLM_RATCHET_PARTS
-
1
;
i
>=
h
;
i
--
)
{
rehash_part
(
megolm
->
data
,
h
,
i
,
megolm
->
counter
-
1
,
megolm
->
counter
);
rehash_part
(
megolm
->
data
,
h
,
i
);
}
}
...
...
@@ -122,7 +121,7 @@ void megolm_advance_to(Megolm *megolm, uint32_t advance_to) {
* to R(j+1)...R(3).
*/
while
(
steps
>
1
)
{
rehash_part
(
megolm
->
data
,
j
,
j
,
megolm
->
counter
,
next_counter
);
rehash_part
(
megolm
->
data
,
j
,
j
);
megolm
->
counter
=
next_counter
;
steps
--
;
next_counter
=
megolm
->
counter
+
increment
;
...
...
@@ -150,7 +149,7 @@ void megolm_advance_to(Megolm *megolm, uint32_t advance_to) {
}
while
(
k
>=
j
)
{
rehash_part
(
megolm
->
data
,
j
,
k
,
megolm
->
counter
,
next_counter
);
rehash_part
(
megolm
->
data
,
j
,
k
);
k
--
;
}
megolm
->
counter
=
next_counter
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment