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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 re: comparing the encrypted values
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

4 Posts

Posted - 02/22/2005 :  12:24:59  Show Profile
Hi all,
I am having trouble comparing the encrypted values. The stored procedure I have makes sense but I can't the encrypted values match up . Could you take a look? Thanks!!
CREATE proc sp_CheckPassword_bak
@initials char(3),
@passwd varchar(180)
declare @hashwd varchar(180)
exec master..xp_repl_encrypt @passwd output
select @hashwd = passwd from tblPassword where initials = 'abc'
if @@rowcount > 0
if @hashwd = @passwd
return (100)

Bustaz Kool
Flowing Fount of Yak Knowledge

1834 Posts

Posted - 02/23/2005 :  15:20:58  Show Profile
You are passing in @passwd as a parameter to sp_CheckPassword_bak and then overwriting it by using it as a parameter to xp_repl_encrypt with OUTPUT.

Can't resist... In general, don't use "sp_" as a prefix to your procedure name. There is a performancce hit associated with this.


Too many parents make life hard for their children by trying, too zealously, to make it easy for them. -Johann Wolfgang von Goethe, poet, dramatist, novelist, and philosopher (1749-1832)
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000