Jump to content
Edwin Simkulet

How to hide the numeric code in C++?

Recommended Posts

Here there is a string of numbers n=123456; when the user enters each number, it is automatically hidden with '*'.

Share this post


Link to post
Share on other sites

Hide from what? The code is presumably going to need to do something with it so you need the information as is. The code itself is transient so you shouldn't need to be worried about people getting the information off of a running system (unless you have a very specific security issue here). If the application crashes or the server is turned off then the information will be gone.

If storing the information to a database you would want to either encrypt it if it needs to be retrieved again (such as an SSN) or hashed if you don't care about getting the value again but only need to compare that the same value was entered again by the user (such as a password). I'm not a C++ dev so I don't know the tools you would use to do that but rest assured someone out there has done it.

 

Share this post


Link to post
Share on other sites

What I mean is that when I am entering my password, the number can automatically change to *, just like when I enter the password for my bank card, it will automatically be masked.

Share this post


Link to post
Share on other sites

oh, what's the front-end? I'm not that familiar with C++.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...