How can I write functions for password encryption and decryption using EncryptByPassphrase and DecryptByPassphrase and use these functions while storing and retrieving password from user table.
the EncryptByPassphrase takes two parameters, a @passphrase and the @cleartext. what is this @passphrase?

Nanhe SiddiqueRank #1,103 · 1.7K reputationPosted May 19, 2015, 4:14 AM EDT
hadoop hadoop142 reputationPosted May 19, 2015, 5:35 AM EDT
hadoop hadoop142 reputationPosted May 20, 2015, 7:51 PM EDT
Nanhe SiddiqueRank #1,103 · 1.7K reputationPosted May 20, 2015, 8:03 PM EDT
Syed ShanuRank #87 · 23.7K reputationPosted May 20, 2015, 8:17 PM EDT
select @MYEncriptionm = EncryptByPassPhrase('key', 'shanu' )
select @MYEncriptionm
select convert(varchar(100),DecryptByPassPhrase('key', @MYEncriptionm ))