Commit Graph

18 Commits

Author SHA1 Message Date
Frank Denis
8b8f89d437 fputs(..., stdout) -> printf()
This reduces the number of functions we use to print something from 5 to 4 (!).
2015-05-27 21:09:32 +02:00
Frank Denis
66819cf0e0 The message and signature aren't secret data 2015-05-27 21:05:51 +02:00
Frank Denis
5a57615f44 print_hex() is always followed by putc('\n'), so let it do it directly 2015-05-27 21:04:32 +02:00
Frank Denis
a313e0be66 Demos: let prompt_input() add extra \n itself 2015-05-27 20:53:54 +02:00
Frank Denis
b1bcecf086 putc('\n', stdout) or putchar('\n') - pick one
And remove duplicate putchar('\n') to improve code clarity
2015-05-27 20:27:07 +02:00
Frank Denis
385b44aee5 sign demo: fix weird max message length 2015-05-27 20:01:03 +02:00
Frank Denis
a67f42e015 sign demo: print signature and message separately 2015-05-27 20:00:05 +02:00
Frank Denis
9060457fac Make prompt_input accept fixed-length and variable-length input.
Now that strings have the correct size, but no trailing \0, puts() cannot safely be
used any more.
2015-05-27 18:10:28 +02:00
Frank Denis
67305902ee DRY 2015-05-27 16:10:07 +02:00
Frank Denis
a748029632 demo_utils -> utils for consistency with other demo files 2015-05-27 15:47:49 +02:00
Frank Denis
efbd347cbb Remove inappropriate sodium_memzero() calls 2015-05-27 15:46:17 +02:00
Frank Denis
81a7abea7e "buffer" and "buffer size" are way too generic to be useful 2015-05-27 15:39:34 +02:00
Frank Denis
ba3fe15b75 Indent 2015-05-27 13:02:56 +02:00
Frank Denis
fb6bb61a72 Dates don't age well 2015-05-27 12:43:49 +02:00
Frank Denis
9c613c2e0c Have main() return a value 2015-05-27 12:41:43 +02:00
GraxRabble
44fed3dd0e fixed the comment about both message and signed message being padded 2014-09-25 13:21:44 -04:00
GraxRabble
7ae583d19a patched all notied issues #192 except for crypto_box_afternm 2014-09-24 19:39:35 -04:00
GraxRabble
c78c978592 added gist examples into demos folder; you can figure out where this belongs 2014-09-24 17:40:21 -04:00