3

I'm writing an applet in python for gnome2 that checks for new emails in gmail.

Actually i'm saving the pass of gmail in a file .config using an encoding base-64. and then decoding the pass everytime i need it.

is this secure?? it's a better way to store a password??

Thanks

1 Answer 1

7

No, it's not secure. Instead, you should use the Gnome keyring service, or whatever the current system offers, to store passwords.

See the keyring package for a Python interface to such services:

import keyring

keyring.set_password('your_application_name', username, password)

keyring will store your password in the most secure keyring available, use get_password('your_application_name', username) to retrieve it again.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer @Martijn.. just one more thing. With this method, I only have to set the password once? whats happen when i reboot the pc?
@Matias: it is stored, so it can be retrieved after a reboot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.