
Originally Posted by
Tyfix
Here is a solution to add MD5 encryption to passwords in database of all user accounts.
It does require a bit of knowledge of MSSQL
First off you'll need a plugin dll to MSSQL which i have attached to this post, put it somewhere on the server (like c:\windows\system32 would be a good choice)
Fire up MSSQL Manager and go to Master database (in MSSQL 2005 its under system databases) go to programmability->Extended Stored Procedures and rightclick on it, select New Extended Stored Procedure. A window will popup asking for a name and a dll location.
Name: xp_md5
DLL: c:\windows\system32\xp_md5.dll (or wherever you put the dll)
Click ok. You should now see your new extended stored procedure called dbo.xp_md5 under the master database.
Close the master database and open your RYL user database (youxiuser) click on New Query up in the top of the management tools and paste this into the new box that popup.
-- Snip --
CREATE FUNCTION [dbo].[fn_md5]
(
@data AS TEXT
)
RETURNS VARCHAR(30) AS
BEGIN
DECLARE @hash VARCHAR(32)
EXEC master.dbo.xp_md5 @data, -1, @hash OUTPUT
RETURN @hash
END
-- End Snip --