Removed stdout buffer for better write speeds
This commit is contained in:
parent
bb437ea4c3
commit
ced58f8a85
3
salty.c
3
salty.c
@ -364,13 +364,13 @@ bool getPassword(char *pw, int size) {
|
|||||||
fprintf (stdout,"*");
|
fprintf (stdout,"*");
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
fflush(stderr);
|
|
||||||
// Show input
|
// Show input
|
||||||
printf ("\033[28m\n");
|
printf ("\033[28m\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
setvbuf(stdout, NULL, _IONBF, 0);
|
||||||
fprintf(stderr,"- NetPaws Salty - File Encryption Program\n");
|
fprintf(stderr,"- NetPaws Salty - File Encryption Program\n");
|
||||||
fprintf(stderr,"- 2024 Ignacio Rivero\n\n");
|
fprintf(stderr,"- 2024 Ignacio Rivero\n\n");
|
||||||
// Initialize libsodium
|
// Initialize libsodium
|
||||||
@ -476,7 +476,6 @@ int main(int argc, char *argv[]) {
|
|||||||
} else {
|
} else {
|
||||||
password = malloc(129);
|
password = malloc(129);
|
||||||
printf(NOR"Enter your encryption password: ");
|
printf(NOR"Enter your encryption password: ");
|
||||||
fflush(stdout);
|
|
||||||
if (!getPassword(password,130)) {
|
if (!getPassword(password,130)) {
|
||||||
fprintf(stderr,ERR"Password is too long.");
|
fprintf(stderr,ERR"Password is too long.");
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user