mark
mark

Reputation: 2941

How to securely temporarily store a password?

If building an application where for sending a series of emails the app must temporarily store the user's password, what is the most secure practice of doing this, if any? If not, what would you recommend?

Upvotes: 1

Views: 447

Answers (2)

Paul Ledger
Paul Ledger

Reputation: 1135

You could use the shared preferences from the device to store and retrieve the password as a string. This string can be deleted from the preferences once you are finished with it.

Upvotes: 1

bjc2406
bjc2406

Reputation: 85

As long as you are not sending the password over the internet, it should not really matter much. If you do want to be more secure, you could store the password in a string and then after it is no longer needed, overwrite it with a string of identical length.

Upvotes: 1

Related Questions