-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for range verfication #1
Conversation
hashchain.c
Outdated
@@ -64,24 +65,37 @@ struct hash_chain hash_chain_create(void *base, | |||
* @param h Pointer to a hash. | |||
* @param tip Pointer to the "tip" hash. | |||
* @param hash Hash algorithm to use. | |||
* @param True if hash(h) == tip | |||
* @param trange Maximum test size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you call it trange
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the semantics of this function is "Could the function be verified in the given range?".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, just use range
.
Please update |
hashchain.c
Outdated
@@ -161,11 +175,12 @@ int cmd_verify(int argc, char **argv) | |||
{ | |||
if (argc < 4) { | |||
fprintf(stderr, "error: too few args\n"); | |||
fprintf(stderr, "usage: %s ALGO QUERY ANCHOR\n", argv[0]); | |||
fprintf(stderr, "usage: %s ALGO QUERY ANCHOR [MAX_TRANGE]\n", argv[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall it be MAX_RANGE
?
Add
trange
parameter tohash_chain_verify
to specify the maximum range.The default test range is specified in
DEFAULT_TRANGE
.