Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 29f4a67c1c |
8
otp.c
8
otp.c
@@ -920,7 +920,7 @@ int encrypt_text(const char* pad_identifier) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Output in ASCII armor format
|
// Output in ASCII armor format
|
||||||
printf("\n-----BEGIN OTP MESSAGE-----\n");
|
printf("\n\n-----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);
|
||||||
@@ -932,7 +932,7 @@ int encrypt_text(const char* pad_identifier) {
|
|||||||
printf("%.64s\n", base64_cipher + i);
|
printf("%.64s\n", base64_cipher + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("-----END OTP MESSAGE-----\n\n");
|
printf("-----END OTP MESSAGE-----\n\n\n");
|
||||||
|
|
||||||
// Cleanup
|
// Cleanup
|
||||||
free(pad_data);
|
free(pad_data);
|
||||||
@@ -972,8 +972,8 @@ int decrypt_text(const char* pad_identifier) {
|
|||||||
|
|
||||||
if (!found_begin) continue;
|
if (!found_begin) continue;
|
||||||
|
|
||||||
if (strncmp(line, "Pad-ChkSum: ", 10) == 0) {
|
if (strncmp(line, "Pad-ChkSum: ", 12) == 0) {
|
||||||
strncpy(stored_chksum, line + 10, 64);
|
strncpy(stored_chksum, line + 12, 64);
|
||||||
stored_chksum[64] = '\0';
|
stored_chksum[64] = '\0';
|
||||||
}
|
}
|
||||||
else if (strncmp(line, "Pad-Offset: ", 12) == 0) {
|
else if (strncmp(line, "Pad-Offset: ", 12) == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user