storing password for e-mail app

Z

zika

I want to create e-mail app, and store user password
localy in a file. So when user starts app, he can check
e-mail without having to enter pass manually.
How do I do that?

I want to distribute source of the app, so think about that too.
 
S

Shezan Baig

I want to create e-mail app, and store user password
localy in a file. So when user starts app, he can check
e-mail without having to enter pass manually.
How do I do that?

You need to open the password file, read the password, and send the
password to the server.

You can learn how to do this by learning about input file streams:

http://www.cplusplus.com/ref/iostream/ifstream/

But I would recommend getting a book.

I want to distribute source of the app, so think about that too.


<offtopic> Look at www.sourceforge.net </offtopic>


Hope this helps,
-shez-
 
K

Karsten Baumgarten

I want to create e-mail app, and store user password
localy in a file. So when user starts app, he can check
e-mail without having to enter pass manually.
How do I do that?

File access can be done using the iostream class, in particular search
for documents about ifstream. Note that you should encrypt the password
before putting it into a regular file. Otherwise i wouldn't want to use
your mail app. ;)

Regards,

Karsten
 
I

Ioannis Vranos

Karsten said:
File access can be done using the iostream class, in particular search
for documents about ifstream. Note that you should encrypt the password
before putting it into a regular file. Otherwise i wouldn't want to use
your mail app. ;)


Not having something against such an encryption, however I do not think
that it is a mandatory approach.


Against what such an encryption would protect?
 
K

Karsten Baumgarten

Ioannis said:
Not having something against such an encryption, however I do not think
that it is a mandatory approach.


Against what such an encryption would protect?

People looking for plain text password files on your computer?
 
Z

zika

What I meant was:

How do I encode password, if I also want to distribute the source of
program?
Anyone can see source and decrypt pass?
 
I

Ioannis Vranos

What I meant was:

How do I encode password, if I also want to distribute the source of
program?
Anyone can see source and decrypt pass?



You can use some (public key?) encryption algorithm (a library perhaps),
with which you can generate a random encryption key during installation,
first run or something.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top