I recently asked a question where i need to develop a way to compare the last 5 passwords for a user before they update their password in a SQL database prior to the password being changed. I asked this using the .Net engine http://www.experts-exchange.com/Database/MS-SQL-Server/Q_28553621.html
and seem to not be making it very far.
It made me think that this has to be a common issue that maybe i'm not looking at it the right way. Is there a way to use SQL Server Triggers or procedures to compare the hashed passwords. For example, I have a PasswordHistory table in the database that stores the history of the hashed password which are copies of the hashed password in the aspnet_Membership table for the users. I imagine that you could create a temporary table that the password that is suggested is first inserted and then if it is a comparison reject the update of the membership table.
I have no real idea how to write SQL Triggers or Procedures so I am reaching out to you all to see if there is an answer. I've been working on this issue for 6 months and intensely the last three weeks. Thank you in advance.