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

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 MD5 in SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-10-18 : 09:05:00
Steve writes "Hey guys. Here is a question that I am looking to figure out. I have a database of users. I want to convert their passwords to MD5. I want to create a store procedure that I can run against the database to do that conversion. I will be only running this procedure once since the website will be sending the one way MD5 hash to the database in the future. I have a MD5.dll that my asp pages are using. Any ideas on getting this to work in SQL or is there a better way of doing this instead of MD5?



Please let me know.


SteveO.."

royv
Constraint Violating Yak Guru

455 Posts

Posted - 2002-10-18 : 12:09:51
Stored procedures can call COM objects, so if you can either convert the MD5 dll to a COM object or make a COM wrapper for your MD5 dll, and have the stored procedure call the COM

*************************
Someone done told you wrong!
Go to Top of Page

aiken
Aged Yak Warrior

525 Posts

Posted - 2002-10-18 : 20:27:40
You could probably also implement MD5 natively in SQL easily enough. A quick google search for "md5 source code" turns up lots of hits, though none in SQL. Here's a page that has it in VB, though, which should be easy enough to follow: http://www.a1vbcode.com/sort.asp?type=popular&intPage=8

Cheers
-b

Go to Top of Page

KHeon
Posting Yak Master

135 Posts

Posted - 2002-10-21 : 07:41:16
My company purchased a COM object called ASPEncrypt (www.aspencrypt.com) and through T-SQL make calls to the object to MD5 Hash passwords in the database. We also do the decryption in the database. Look up sp_OACreate, sp_OAGetProperty, sp_OAMethod, sp_OASetProperty, sp_OAGetErrorInfo and sp_OADestroy stored procedures in BOL for information on how to call an COM object from T-SQL.

Kyle Heon
PixelMEDIA, Inc.
Senior Application Programmer, MCP
kheon@pixelmedia.com
Go to Top of Page
   

- Advertisement -