SQL -- EncryptByPassPhrase
SELECT EncryptByPassPhrase('Test-String', 'Bazinga') AS EncryptedString
--result encrypted value: 0x0100000058324693D3274FE65F2E975F9637059632CC3C9FD4C96F9E
SELECT CONVERT(VARCHAR(100),DecryptByPassPhrase('Test-String'
, 0x0100000058324693D3274FE65F2E975F9637059632CC3C9FD4C96F9E)) AS DeEncryptedString
--result decrypted value : Bazinga