GoCubs
asked on
Problem With SQL Server 2008 R2 Encryption
I'm using SQL Server 2008 R2 Standard Edition and I am trying to figure out encryption. I have done the below without the expected results. Can someone help?
Here are the results:
Encrypted = 0x005A871A34210549973A890D B48C920301 0000002278 EAE8B8F011 47EE0B3C87 AC83CB4170 5196404D43 193FCFE8C1 99B1A4E2BF 731C133366 7EA445AA00 B82F5D237C 08
Decrypted = 0x3132332D34352D36302D3933 3730
Here are the results:
Encrypted = 0x005A871A34210549973A890D
Decrypted = 0x3132332D34352D36302D3933
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '23987hxJKL969#ghf0%94467GRkjg5k3fd117r$$#1946kcj$n44nhdlj'
GO
CREATE CERTIFICATE TestCERTIFICATE WITH SUBJECT = 'Test CERTIFICATE';
GO
CREATE SYMMETRIC KEY TestKey WITH ALGORITHM = AES_256 ENCRYPTION BY CERTIFICATE TestCERTIFICATE;
GO
OPEN SYMMETRIC KEY TestKey DECRYPTION BY CERTIFICATE TestCERTIFICATE;
go
select EncryptByKey(Key_GUID('TestKey'), '123-45-60-9370'),
DecryptByKey(EncryptByKey(Key_GUID('TestKey'), '123-45-60-9370'));
GO
close SYMMETRIC KEY TestKey
go
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER