summaryrefslogtreecommitdiff
path: root/yarrow_key_event.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2001-12-05 13:39:44 +0100
committerNiels Möller <nisse@lysator.liu.se>2001-12-05 13:39:44 +0100
commit40dd5fc9d493ffba5ccaad98d20762e9e0e3049c (patch)
treeb8c9656673851a1047238b20bcf9559a069b228b /yarrow_key_event.c
parent3e7a480a1e3518841fbf3135cb0e9671f1df3615 (diff)
downloadnettle-40dd5fc9d493ffba5ccaad98d20762e9e0e3049c.tar.gz
(yarrow_key_event_estimate): Fixed handling
of timing info. Rev: src/nettle/yarrow_key_event.c:1.3
Diffstat (limited to 'yarrow_key_event.c')
-rw-r--r--yarrow_key_event.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/yarrow_key_event.c b/yarrow_key_event.c
index 6ea9a811..9b25c96c 100644
--- a/yarrow_key_event.c
+++ b/yarrow_key_event.c
@@ -44,9 +44,9 @@ yarrow_key_event_estimate(struct yarrow_key_event_ctx *ctx,
unsigned i;
/* Look at timing first. */
- if (ctx->previous)
+ if (ctx->previous && (time > ctx->previous) )
{
- if ( (time - ctx->previous) < 256)
+ if ( (time - ctx->previous) >= 256)
entropy++;
}
ctx->previous = time;