By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,305 Members | 1,704 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,305 IT Pros & Developers. It's quick & easy.

storing password for e-mail app

P: n/a
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.

Jul 23 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a

zi**@lova.every1.net wrote:
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-

Jul 23 '05 #2

P: n/a
zi**@lova.every1.net wrote:
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
Jul 23 '05 #3

P: n/a
Karsten Baumgarten wrote:
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?


--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #4

P: n/a
Ioannis Vranos wrote:
Karsten Baumgarten wrote:
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?


People looking for plain text password files on your computer?
Jul 23 '05 #5

P: n/a
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?

Jul 23 '05 #6

P: n/a
zi**@lova.every1.net wrote:
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.


--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.