Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 varbinary to float conversion help

Author  Topic 

learntsql

524 Posts

Posted - 2010-03-26 : 06:50:11
By Using encryption function i have converted float data into varbinary.
While decrypting how to convert this to again float.
TIA.

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-03-26 : 07:13:21
Can you please post the encryption function.

Vaibhav T
Go to Top of Page

learntsql

524 Posts

Posted - 2010-03-26 : 07:30:16
--Encrypt Function
EncryptByKey(Key_GUID('EncryptionKey'), CONVERT(VARBINARY,SALARY),1, AuthenticationCode)

--Decrypt Function
,CONVERT(float,DecryptByKeyAutoCert(cert_ID('EncryptionKey'), NULL, SALARY, 1, AuthenticationCode))

Any Ideas please....
Go to Top of Page

learntsql

524 Posts

Posted - 2010-03-29 : 00:35:51
Any hint please........
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2010-03-29 : 12:05:19
Does your code not work? Are you getting an error, if so, what error are you getting?

What is the return type of the DecryptByKeyAutoCert function?
Go to Top of Page
   

- Advertisement -