Skip to content

Commit c3ab2f6

Browse files
committed
Print a success line from the silent file-encrypt and ecc-export examples
1 parent c8976f6 commit c3ab2f6

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

crypto/3des/3des-file-encrypt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,9 @@ int main(int argc, char** argv)
469469
ret = Des3Encrypt(&des3, key, size, inFile, outFile);
470470
else if (choice == 'd')
471471
ret = Des3Decrypt(&des3, key, size, inFile, outFile);
472+
if (ret == 0)
473+
XPRINTF("Success: 3DES %s complete\n",
474+
choice == 'e' ? "encrypt" : "decrypt");
472475
}
473476
else {
474477
wc_ForceZero(key, size);

crypto/ascon/ascon-file-encrypt.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,14 +551,16 @@ int main(int argc, char** argv)
551551
}
552552
if (choice == 'e') {
553553
ret = AsconEncrypt(ctx);
554-
if (ret != SUCCESS) {
554+
if (ret != SUCCESS)
555555
printf("Ascon encrypt failed\n");
556-
}
556+
else
557+
printf("Success: Ascon encrypt complete\n");
557558
} else {
558559
ret = AsconDecrypt(ctx);
559-
if (ret != SUCCESS) {
560+
if (ret != SUCCESS)
560561
printf("Ascon decrypt failed\n");
561-
}
562+
else
563+
printf("Success: Ascon decrypt complete\n");
562564
}
563565
}
564566
else {

crypto/camellia/camellia-encrypt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@ int main(int argc, char** argv)
434434
ret = CamelliaEncrypt(&cam, key, size, inFile, outFile);
435435
else if (choice == 'd')
436436
ret = CamelliaDecrypt(&cam, key, size, inFile, outFile);
437+
if (ret == 0)
438+
printf("Success: Camellia %s complete\n",
439+
choice == 'e' ? "encrypt" : "decrypt");
437440
}
438441
else {
439442
wc_ForceZero(key, size);

ecc/ecc-export-Qx-Qy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ int main(int argc, char *argv[])
9090
exit(7);
9191
}
9292
close(fd_out);
93+
printf("Exported Qx and Qy to %s\n", argv[2]);
9394
return 0;
9495
}
9596

0 commit comments

Comments
 (0)