I thought this would've been a lot simpler but at this point I'm confused and haven't progressed at all.
Basically, I need to be able to accept a password from a user in a WPF app, encrypt it then store this in a database and be able to decrypt later on. However I'm not sure how to implement this.
This is completely trivial so whether it's safe or not doesn't matter. All I need is for it to get working only I'm unsure exactly how to do it. I've tried playing around with the DESCryptoServiceProvider() but haven't gotten anywhere.
To be clear, how exactly do I go about converting a simple password into something that's been encrypted and storing it in the database (and what fields would I store it in). At this point, I'm happy if there's only one key and that key is being defined in the source code.
Any suggestions?
Edit: To clarify further, I can't 'encode'. It has to be encrypted for the purposes of this exercise (i.e. it needs to have a key generated). I believe SHA is an encoding algorithm, not encryption.