Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Тур Тимофей Владимирович
libakrypt-0.x belt-hash
Commits
3e52fab1
Commit
3e52fab1
authored
2 months ago
by
Тур Тимофей Владимирович
Browse files
Options
Download
Patches
Plain Diff
printing
parent
f0e52f8f
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/ak_belt_hash.c
+12
-0
source/ak_belt_hash.c
with
12 additions
and
0 deletions
+12
-0
source/ak_belt_hash.c
+
12
−
0
View file @
3e52fab1
...
...
@@ -6,6 +6,7 @@
/* ----------------------------------------------------------------------------------------------- */
#include
<libakrypt-internal.h>
#include
<stdio.h>
//---------------------------------------------------------
//----------------------belt-block-------------------------
...
...
@@ -388,15 +389,26 @@ static int ak_hash_context_belt_hash_finalize( ak_pointer bctx,
count_for_r
=
size
<<
3
;
carry
=
(
ak_uint32
*
)
&
count_for_r
;
printf
(
"1: %i %li %i %i
\n
"
,
cx
->
ls
[
0
],
count_for_r
,
carry
[
0
],
carry
[
1
]);
carry
[
0
]
=
(
cx
->
ls
[
0
]
+=
carry
[
0
])
<
carry
[
0
];
printf
(
"2: %i
\n
"
,
count
[
0
]);
carry
[
0
]
=
(
carry
[
1
]
+=
carry
[
0
])
<
carry
[
0
];
printf
(
"3: %i
\n
"
,
count
[
0
]);
carry
[
1
]
=
(
cx
->
ls
[
1
]
+=
carry
[
1
])
<
carry
[
1
];
printf
(
"4: %i
\n
"
,
count
[
1
]);
carry
[
0
]
=
(
cx
->
ls
[
2
]
+=
carry
[
0
])
<
carry
[
0
];
printf
(
"5: %i
\n
"
,
count
[
0
]);
carry
[
1
]
=
(
cx
->
ls
[
2
]
+=
carry
[
1
])
<
carry
[
1
];
printf
(
"6: %i
\n
"
,
count
[
1
]);
cx
->
ls
[
3
]
+=
carry
[
0
]
+
carry
[
1
];
count_for_r
=
size
>>
61
;
printf
(
"7: %i %li %i %i
\n
"
,
cx
->
ls
[
0
],
count_for_r
,
carry
[
0
],
carry
[
1
]);
carry
[
0
]
=
(
cx
->
ls
[
2
]
+=
carry
[
0
])
<
carry
[
0
];
printf
(
"8: %i
\n
"
,
count
[
0
]);
cx
->
ls
[
3
]
+=
carry
[
0
];
/*
carry = (bx->ls[0] += carry) < carry;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets