Zwe Hlaing Bwa

စိတ္ကူးတည့္ရာေရးထားေသာ ဘေလာ့ခ္

Hide password input on terminal

Posted by Zwe on October 14, 2013

I have searched password masking code which can be compile and run on Ubuntu 12.04 environment. At last, I found out one piece of code which serves for my purpose.

#include <stdio.h>
 #include <unistd.h>
 int main()
 char *password; // password string pointer
 password = getpass("Enter Password: "); // get a password
 printf("%s\n",password); // this is just for conformation
 // that password stored successfully
 return 1;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: