Hide Password Chars

This is a discussion on Hide Password Chars within the C Programming forums, part of the General Programming Boards category; Hi, I would like to know how can I write a program in 'C' so that when the user types ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    5

    Hide Password Chars

    Hi,

    I would like to know how can I write a program in 'C' so that when the user types in the password, the characters are not displayed on the screen. I want to do this on both Windows and Unix.

    Ta,
    Moepi

  2. #2
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669
    Shadow posted 13 examples and one of them is the hiding password chars. Download it here.
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    5
    Hi,

    Hi,

    ON WINDOWS IT WORKS FINE.

    I would like to know how can I write a program in 'C' so that when the user types in the password, the characters are not displayed on the screen. I want to do this Unix.

    Ta,
    Moepi

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    5
    Hi,

    Hi,

    ON WINDOWS IT WORKS FINE.

    I would like to know how can I write a program in 'C' so that when the user types in the password, the characters are not displayed on the screen.

    I WANT TO DO THIS ON UNIX.


    Ta,
    Moepi

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    You need getch() or your local equivalent. This is a non standard function that appears in various compilers.

    I'd suggest doing a man on getch and hopefully it'll tell you which library it's in. The principles are the same though.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [Q]Hide Password
    By Yuri in forum C++ Programming
    Replies: 14
    Last Post: 03-02-2006, 02:42 AM
  2. Enter password, hide by "*".
    By toysoldier in forum C++ Programming
    Replies: 28
    Last Post: 08-15-2004, 08:13 AM
  3. Hide Password On Unix
    By Moepi in forum C Programming
    Replies: 3
    Last Post: 05-24-2002, 07:33 AM
  4. Hide Password Characters
    By Moepi in forum C++ Programming
    Replies: 2
    Last Post: 05-24-2002, 04:57 AM
  5. How to hide password
    By Unregistered in forum Windows Programming
    Replies: 7
    Last Post: 02-02-2002, 04:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21