Compare commits

...

1 Commits

Author SHA1 Message Date
3859e6492a Version v0.2.98 - Silent mode 2025-08-27 09:03:22 -04:00

7
otp.c
View File

@@ -345,8 +345,8 @@ int command_line_mode(int argc, char* argv[]) {
else if (argc == 3) {
// Check if the argument looks like an encrypted message (starts with -----)
if (strncmp(argv[2], "-----BEGIN OTP MESSAGE-----", 27) == 0) {
// Inline decrypt with message only
return decrypt_text(NULL, argv[2]);
// Inline decrypt with message only - use silent mode for command line
return decrypt_text_silent(NULL, argv[2]);
} else {
// Check if it's a file (contains . or ends with known extensions)
if (strstr(argv[2], ".") != NULL) {
@@ -365,7 +365,8 @@ int command_line_mode(int argc, char* argv[]) {
return 1;
} else {
// Legacy format: pad_chksum and message, or file with output
return decrypt_text(argv[2], argv[3]);
// Use silent mode for command line when message is provided
return decrypt_text_silent(argv[2], argv[3]);
}
}
else if (argc == 5 && strcmp(argv[3], "-o") == 0) {