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.
| Author |
Topic |
|
stonebreaker
Yak Posting Veteran
92 Posts |
Posted - 2010-06-22 : 08:23:38
|
| I used the first encryption example in the online books articlems-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_4deptrbl/html/38e9bf58-10c6-46ed-83cb-e2d76cda0adc.htmI changed it slightly to use my own database and table, but otherwise left it alone. The data seems to encrypt ok, but when I decrypt it I get this:Plain SSN Encrypted SSN Decrypted SSN123456789 <Encrypted binary> ????9132989999 <Encrypted binary> ????9997999999 <Encrypted binary> ????9I tried changing the data type for the encrypted data from varbinary(128) to varbinary(256), and no luck. Any help would be greatly appreciated.StonebreakerThe greatest obstacle to discovery is not ignorance - it is the illusion of knowledge. -Daniel Boorstin |
|
|
stonebreaker
Yak Posting Veteran
92 Posts |
Posted - 2010-06-22 : 09:47:19
|
| Nevermind, I found the bug. The column being encrypted was a varchar, and I was converting to an nvarchar when decrypting.(_8(|) D'oh!StonebreakerThe greatest obstacle to discovery is not ignorance - it is the illusion of knowledge. -Daniel Boorstin |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-06-22 : 11:07:34
|
| Useful to know that though .. thanks for "reporting back" |
 |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2010-06-22 : 19:41:29
|
| (North or South Korean?)=======================================A couple of months in the laboratory can save a couple of hours in the library. -Frank H. Westheimer, chemistry professor (1912-2007) |
 |
|
|
|
|
|