Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 41ef97c43e |
11
encrypted.txt
Normal file
11
encrypted.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
-----BEGIN OTP MESSAGE-----
|
||||||
|
Version: v0.2.72
|
||||||
|
Pad-ChkSum: 97d9d82b5414a9439102f3811fb90ab1d6368a00d33229a18b306476f9d04f82
|
||||||
|
Pad-Offset: 2873419
|
||||||
|
|
||||||
|
iR6J7HHK1Oc6
|
||||||
|
-----END OTP MESSAGE-----
|
||||||
|
|
||||||
|
|
||||||
13
otp.c
13
otp.c
@@ -1390,8 +1390,15 @@ int encrypt_text(const char* pad_identifier, const char* input_text) {
|
|||||||
printf("Warning: Failed to update state file\n");
|
printf("Warning: Failed to update state file\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output in ASCII armor format
|
// Output in ASCII armor format - clean format for piping, spaced format for interactive
|
||||||
|
int is_interactive = (input_text == NULL); // Interactive if no input_text provided
|
||||||
|
|
||||||
|
if (is_interactive) {
|
||||||
printf("\n\n-----BEGIN OTP MESSAGE-----\n");
|
printf("\n\n-----BEGIN OTP MESSAGE-----\n");
|
||||||
|
} else {
|
||||||
|
printf("-----BEGIN OTP MESSAGE-----\n");
|
||||||
|
}
|
||||||
|
|
||||||
printf("Version: %s\n", get_version());
|
printf("Version: %s\n", get_version());
|
||||||
printf("Pad-ChkSum: %s\n", chksum_hex);
|
printf("Pad-ChkSum: %s\n", chksum_hex);
|
||||||
printf("Pad-Offset: %lu\n", current_offset);
|
printf("Pad-Offset: %lu\n", current_offset);
|
||||||
@@ -1403,7 +1410,11 @@ int encrypt_text(const char* pad_identifier, const char* input_text) {
|
|||||||
printf("%.64s\n", base64_cipher + i);
|
printf("%.64s\n", base64_cipher + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_interactive) {
|
||||||
printf("-----END OTP MESSAGE-----\n\n\n");
|
printf("-----END OTP MESSAGE-----\n\n\n");
|
||||||
|
} else {
|
||||||
|
printf("-----END OTP MESSAGE-----\n");
|
||||||
|
}
|
||||||
|
|
||||||
// Cleanup
|
// Cleanup
|
||||||
free(pad_data);
|
free(pad_data);
|
||||||
|
|||||||
Reference in New Issue
Block a user