Why doesn't this work?
CREATE TABLE [dbo].[WebSecurity](
[WebSecurityID] [int] IDENTITY(1,1) NOT NULL,
[webIdentity] [varchar](50) NOT NULL,
[webPassword_encrypted] [varbinary](256) NULL)
delete from websecurity
insert into WebSecurity (WebIdentity,webpassword_encrypted)
values('vanwagenen\WebServer',EncryptByP
assPhrase ('myphrase','mypassword'))
select webidentity, decryptByPassPhrase
('myphrase',webpassword_encrypted)from webSecurity
--
Arne Garvander
Certified Geek
Professional Data DudeHello Arne,
It did, you just didn't get the answer you expected. Try:
select webidentity, cast(decryptByPassPhrase ('myphrase',webpassword_encrypt
ed)
as varchar(255)) from webSecurity
Thanks,
Kent Tegels
http://staff.develop.com/ktegels/
Thursday, March 22, 2012
encryption
Labels:
91dbo,
91int,
91webidentity,
91websecurity,
91websecurityid,
database,
encryption,
identity,
microsoft,
mysql,
null,
oracle,
server,
sql,
table,
workcreate
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment