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-stb34v2
Commits
1add6072
Commit
1add6072
authored
2 months ago
by
Белов Никита Сергеевич
Browse files
Options
Download
Patches
Plain Diff
Update test-belt-hash.c
parent
008c2047
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/tests/test-belt-hash.c
+4
-10
examples/tests/test-belt-hash.c
with
4 additions
and
10 deletions
+4
-10
examples/tests/test-belt-hash.c
+
4
−
10
View file @
1add6072
#include
<stdio.h>
#include
<libakrypt.h>
static
int
ak_function_my_audit
(
const
char
*
message
)
{
if
(
message
!=
NULL
)
fprintf
(
stderr
,
"%s
\n
"
,
message
);
return
ak_error_ok
;
}
int
main
()
{
int
error
=
ak_error_ok
;
/* Инициализация криптографической библиотеки */
int
exitstatus
=
EXIT_FAILURE
;
/* Контекст для вычисления хеширования */
struct
hash
hctx
;
struct
bckey
belt
;
ak_uint8
input1
[
13
]
=
{
...
...
@@ -32,8 +24,9 @@ int main()
ak_libakrypt_destroy
();
return
EXIT_FAILURE
;
}
ak_bckey_create_belt
(
&
belt
);
ak_hash_create_belt
(
&
hctx
);
ak_hash_create_belt
(
&
hctx
,
&
belt
);
ak_hash_ptr
(
&
hctx
,
input1
,
13
,
output
,
32
);
printf
(
"Test 1
\n
"
);
...
...
@@ -76,6 +69,7 @@ int main()
printf
(
"2: %s
\n
"
,
ak_ptr_to_hexstr
(
output
,
sizeof
(
output
),
ak_false
));
ak_hash_destroy
(
&
hctx
);
ak_bckey_destroy
(
&
belt
);
return
0
;
}
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