Click here to Skip to main content
15,897,704 members

Comments by Rakesh N Bhavsar (Top 1 by date)

Rakesh N Bhavsar 6-Jul-12 4:51am View    
I am agree with Mukund Thakker.
"When we run both functions in a single query it works fine. But when we run it using separate sql scripts it will not work."

Scenario is as follows:
I have created two different stored procedures each one for EncryptByPassPhrase('key', 'abc' ) and another for convert(varchar(100),DecryptByPassPhrase('key', @encrypt))
I am storing procedure 1 result into database.
Procedure 2 will retrived stored encrypted varbinary value and do decryption and it is returning 'NULL' value.
Frankly I din't get the exact use of sql 'DecryptByPassPhrase()' function.