Help with Masking the Input

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nbaztec
    New Member
    • Feb 2008
    • 1

    Help with Masking the Input

    I have made a program to take password from the user and chek if its right or not.
    There's no problem with it. The only problem i face is to mask the input

    I know of getpass() but it limits the string to 8 characters only
    does anyone of you know how to increase the size of getpass() or a better C++ function to help me mask(or not echoing to screen) the input of user..

    Thanks in advance
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by nbaztec
    I have made a program to take password from the user and chek if its right or not.
    There's no problem with it. The only problem i face is to mask the input

    I know of getpass() but it limits the string to 8 characters only
    does anyone of you know how to increase the size of getpass() or a better C++ function to help me mask(or not echoing to screen) the input of user..

    Thanks in advance

    I know that there are some ioctl functions to mask the user input and stop it from echoing on the screen.
    Go through this link and look for the options in the termios struct and you can get some idea on how to mask the input.

    Raghuram
    Raghuram

    Comment

    Working...