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,"*");
|
||||
i--;
|
||||
}
|
||||
fflush(stderr);
|
||||
// Show input
|
||||
printf ("\033[28m\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
fprintf(stderr,"- NetPaws Salty - File Encryption Program\n");
|
||||
fprintf(stderr,"- 2024 Ignacio Rivero\n\n");
|
||||
// Initialize libsodium
|
||||
@ -476,7 +476,6 @@ int main(int argc, char *argv[]) {
|
||||
} else {
|
||||
password = malloc(129);
|
||||
printf(NOR"Enter your encryption password: ");
|
||||
fflush(stdout);
|
||||
if (!getPassword(password,130)) {
|
||||
fprintf(stderr,ERR"Password is too long.");
|
||||
return 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user