How to encrypt specific columns?

1
In our application we use the hash algorithm SSHA256. As far as I understand this means that any value stored as hashstring is not retrievable/readable after storage. I would like that to remain that way. However, we now have a requirement to encrypt (3DES, AES-256 are mentioned) certain values in the db which we should be able to retrieve in the application. How can I best accomplish this?
asked
1 answers
1

As you said, encryption is not the same as hashing as you need to be able to decrypt in the case of encryption. This would have to be custom code. You could have a look at the Exchange module in the Appstore where there is a bit of code for encrypting and decrypting the user's password for the Exchange server as well (I used AES there, though I believe it was 128 bit).

Obviously you also need to store an encryption key somewhere. I used a constant for this so it can be adjusted for production.

answered