title: How to encrypt data in sql server and decrypt it in .net apps
body: <p>I want to encrypt some passwords in sql server and have a c# app decrypt them.  </p>
  
  <p>Obviously I can create an SP to decrypt the required password for me and pass this to the c# app, but this means sending the plaintext password over network.  </p>
  
  <p>So I want to be able to encrypt my password in sql server (using passphrase, certificate etc), which can be passed around to my c# apps which will then know how to decrypt it and use it.</p>
  
  <p>I think this must be possible (maybe using certificates) but not really sure where to start.  </p>
  
  <p>Can use .net 4 and sql server 2008 if there are new approaches to this.  </p>
  
  <p>Thanks in advance for your advice.</p>