Encrypted properties ?

Hello all,
What is the recommend way to store encrypted properties within an application?
For example – if you want to store database credentials in a properties file, what would the recommended method be?

Thank you.

On OS X store them in the keychain
Not sure Windows or linux have anything similar

[quote=18077:@Christopher Seymour]Hello all,
What is the recommend way to store encrypted properties within an application?
For example – if you want to store database credentials in a properties file, what would the recommended method be?

Thank you.[/quote]
You really can’t. If your app can read the data, so can something else. All you can do is make it more difficult.

[quote=18081:@Norman Palardy]On OS X store them in the keychain
Not sure Windows or linux have anything similar[/quote]
Not quite similar, but Win32 does provide the CryptProtectData/CryptUnprotectData APIs to securely store data on a user- or machine-specific basis. http://msdn.microsoft.com/en-us/library/aa380261(v=vs.85).aspx

im using encrypted database for passwords and application settings, i store every attribute in encrypted sqlite database, when application is launched, ask user password and try to open the secured database with that password, if password is correct database is opened, othewise data is kept secured in aes-128 crypted sqlite database.

And you should obfuscate your own credentials to access this database in your code.