请教存储过程MD5加密
我想在登陆存储过程中对客户端输入的密码二次MD5加密(客户端已经加密过一次),因为1号程序注册时是对密码进行了两次MD5加密来存储的,登陆也是两次MD5加密密码来对比,我的2号客户端只有一次MD5加密,不能登陆,因为没源码,所以只能修改存储过程来实现登陆。-----------------------------------------------------------------------
-- 帐号登陆
CREATE PROC [dbo].[GSP_GP_dlAccounta]
@strAccounts NVARCHAR(31), -- 用户帐号
@strPassword NCHAR(32), -- 用户密码
@strClientIP NVARCHAR(15), -- 连接地址
@strMachineSerial NCHAR(32) -- 机器标识
AS
-- 属性设置
SET NOCOUNT ON
-- 查询用户
DECLARE @Nullity BIT
DECLARE @StunDown BIT
DECLARE @LogonPass AS NCHAR(32)
DECLARE @MachineSerial NCHAR(32)
DECLARE @MoorMachine AS TINYINT
SELECT @UserID=UserID, @GameID=GameID, @Accounts=Accounts, @UnderWrite=UnderWrite, @LogonPass=LogonPass, @FaceID=FaceID,
@Gender=Gender, @Nullity=Nullity, @StunDown=StunDown, @Experience=Experience, @MemberOrder=MemberOrder, @MemberOverDate=MemberOverDate,
@MoorMachine=MoorMachine, @MachineSerial=MachineSerial, @Loveliness=Loveliness,@CustomFaceVer=CustomFaceVer,@Nickname=Nickname,
@lTaskAward=TaskAward
FROM AccountsInfo(NOLOCK) WHERE Accounts=@strAccounts
-- 密码判断
IF @LogonPass<>@strPassword
BEGIN
SELECT [ErrorDescribe]=N'您的帐号不存在或者密码输入有误,请查证后再次尝试登录!'
RETURN 3
END
------------------------------------------------
请问如何实现用MD5再加密一次2号客户端传来的密码(@strPassword)来和表中LogonPass内容比较?请高手指点!