[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: preferences: password encrypt?

To do this properly, you'll need to include the Java Cryptography Extensions, and override StringFieldEditor to encrypt/decrypt the password when putting/getting it from the preference store.

I also suggest participating in the org.eclipse.equinox group discussions on security.

Nick

arne anka wrote:
i have an IWorkbenchPreferencePage for configuring path to and name of a DerbyDB and username and password.
the password is inserted in to a


StringFieldEditor sfeP=new StringFieldEditor(PreferenceConstants.P_STRING, "Password:", getFieldEditorParent());
sfeP.getTextControl(getFieldEditorParent()).setEchoChar('*');


the * as echo-char helps against anybody looking into the preferences while the program runs -- but the prefs, and the thus passwordl, are stored as simple plaintext in a file with the rights set to 644.
how do i secure the preferences against being read from anybody unauthorized?