Hello,
I have a question about En-/Decoding. I have written a tool that reads connection settings for the data base from a file (XML). In this file I’ll also store the password of the db user - of course encoded! :-)
Additionally, I still want to offer another tool that does the encoding, provide the functionality to enter a password in plain text press a button and get the pw as an encrypted string. This string should be stored within the file XML. Then the first tool should be able to read the encrypted pw from the XML file, decode it and use it for data base connect.
Now I have tried to do it with Cipher – I’m able to encode a text but have no idea how to store the encryption key, so that I can decrypt the text in another session.
Is there anybody who can provide me a code sample or so?
Thanks in advance for your help.