Skip to content

Instantly share code, notes, and snippets.

@AlexKasaku
AlexKasaku / gist:19a94e25079a5fe3985b116c71e57f58
Created November 11, 2019 15:14 — forked from kamsar/gist:6407742
This class provides a method to 'upgrade' the hash algorithm used by the SqlMembershipProvider without resetting all existing passwords. Users can effectively then be authenticated using either legacy or modern hashes, and any time a hash gets touched it will be upgraded automatically.
using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Web.Security;