projects
/
radsecproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5042a29
)
Produce full length F-Tick MAC hashes for FullyHashed and FullyKeyHashed.
author
Linus Nordberg
<linus@nordu.net>
Tue, 5 Apr 2011 13:50:59 +0000
(15:50 +0200)
committer
Linus Nordberg
<linus@nordu.net>
Tue, 5 Apr 2011 13:50:59 +0000
(15:50 +0200)
We produced 62 octets rather than 64.
fticks.c
patch
|
blob
|
history
diff --git
a/fticks.c
b/fticks.c
index
ce4888e
..
f882854
100644
(file)
--- a/
fticks.c
+++ b/
fticks.c
@@
-19,10
+19,10
@@
static void
format_hash(const uint8_t *hash, size_t out_len, uint8_t *out)
{
- int i;
+ int i
r, iw
;
- for (i
= 0; i < out_len / 2 - 1; i++
)
- sprintf((char *) out + i
*2, "%02x", hash[i
% SHA256_DIGEST_SIZE]);
+ for (i
r = 0, iw = 0; iw <= out_len - 3; ir++, iw += 2
)
+ sprintf((char *) out + i
w, "%02x", hash[ir
% SHA256_DIGEST_SIZE]);
}
static void