Version v0.2.10 - Automatic version increment
This commit is contained in:
8
otp.c
8
otp.c
@@ -377,7 +377,7 @@ int list_available_pads(void) {
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
printf("Available pads:\n");
|
printf("Available pads:\n");
|
||||||
printf("%-4s %-20s %-12s %-12s %-8s\n", "No.", "Hash (first 16 chars)", "Size", "Used", "% Used");
|
printf("%-4s %-20s %-12s %-12s %-8s\n", "No.", "ChkSum (first 16 chars)", "Size", "Used", "% Used");
|
||||||
printf("%-4s %-20s %-12s %-12s %-8s\n", "---", "-------------------", "----------", "----------", "------");
|
printf("%-4s %-20s %-12s %-12s %-8s\n", "---", "-------------------", "----------", "----------", "------");
|
||||||
|
|
||||||
while ((entry = readdir(dir)) != NULL) {
|
while ((entry = readdir(dir)) != NULL) {
|
||||||
@@ -455,7 +455,7 @@ int show_pad_info(const char* chksum) {
|
|||||||
read_state_offset(chksum, &used_bytes);
|
read_state_offset(chksum, &used_bytes);
|
||||||
|
|
||||||
printf("=== Pad Information ===\n");
|
printf("=== Pad Information ===\n");
|
||||||
printf("Hash: %s\n", chksum);
|
printf("ChkSum: %s\n", chksum);
|
||||||
printf("File: %s\n", pad_filename);
|
printf("File: %s\n", pad_filename);
|
||||||
|
|
||||||
double size_gb = (double)st.st_size / (1024.0 * 1024.0 * 1024.0);
|
double size_gb = (double)st.st_size / (1024.0 * 1024.0 * 1024.0);
|
||||||
@@ -922,7 +922,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-----BEGIN OTP MESSAGE-----\n");
|
||||||
printf("Version: %s\n", get_version());
|
printf("Version: %s\n", get_version());
|
||||||
printf("Pad-Hash: %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);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
@@ -972,7 +972,7 @@ int decrypt_text(const char* pad_identifier) {
|
|||||||
|
|
||||||
if (!found_begin) continue;
|
if (!found_begin) continue;
|
||||||
|
|
||||||
if (strncmp(line, "Pad-Hash: ", 10) == 0) {
|
if (strncmp(line, "Pad-ChkSum: ", 10) == 0) {
|
||||||
strncpy(stored_chksum, line + 10, 64);
|
strncpy(stored_chksum, line + 10, 64);
|
||||||
stored_chksum[64] = '\0';
|
stored_chksum[64] = '\0';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user