From a67f42e015d658ab6985fd7543872e6fe41c94ff Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 27 May 2015 20:00:05 +0200 Subject: [PATCH] sign demo: print signature and message separately --- demos/sign.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/demos/sign.c b/demos/sign.c index 49b6568e..dafbdb28 100644 --- a/demos/sign.c +++ b/demos/sign.c @@ -60,12 +60,12 @@ sign(void) putchar('\n'); putchar('\n'); - puts("Format: signature::message"); - fputs("Signed: ", stdout); + fputs("Signature: ", stdout); print_hex(sm, crypto_sign_BYTES); - fputs("::", stdout); - puts((const char*)sm + crypto_sign_BYTES); - putc('\n', stdout); + putchar('\n'); + fputs("Message: ", stdout); + fwrite(sm + crypto_sign_BYTES, 1U, smlen - crypto_sign_BYTES, stdout); + putchar('\n'); puts("Validating message..."); r = crypto_sign_open(m, &mlen, sm, smlen, pk);