projects
/
platform
/
core
/
security
/
yaca.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4888d6
)
Make digest context reusable after finish
46/75046/2
author
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Thu, 16 Jun 2016 10:41:02 +0000
(12:41 +0200)
committer
Lukasz Pawelczyk
<l.pawelczyk@samsung.com>
Fri, 17 Jun 2016 09:57:15 +0000
(
02:57
-0700)
Change-Id: Iecb125820264470a25fe42e0449c991d7ad3c5bc
src/digest.c
patch
|
blob
|
history
diff --git
a/src/digest.c
b/src/digest.c
index
b003e97
..
6062a2b
100644
(file)
--- a/
src/digest.c
+++ b/
src/digest.c
@@
-204,6
+204,14
@@
API int yaca_digest_finalize(yaca_context_h ctx, char *digest, size_t *digest_le
return ret;
}
+ /* Make it reusable */
+ ret = c->mdctx->digest->init(c->mdctx);
+ if (ret != 1) {
+ ret = YACA_ERROR_INTERNAL;
+ ERROR_DUMP(ret);
+ return ret;
+ }
+
*digest_len = len;
return YACA_ERROR_NONE;