SimpleMember User Account Creation with T-SQL - How are the passwords hashed?

tim_smith

New Member
Can Simple Membership user accounts be created from SQL Server Management Studio?The only methods I have found for User/Account creation are in C# when running a application: \[code\]WebSecurity.CreateUserAndAccount("userName", "password", new { ... }, false);\[/code\]Is there any way to generate a hashed password that can be used in Simple Membership with t-SQL? Are the requirements for a Simple Membership hashed password known? I have found other methods for generating the password with the DefaultMembershipProvider, but the passwords are not compatible with Simple Membership.EDIT:I was hoping to find a process similar to this: \[code\]declare @salt nvarchar(128)declare @password varbinary(256)declare @input varbinary(512)declare @hash varchar(64)-- Change these values (@salt should be Base64 encoded)set @salt = N'eyhKDP858wdrYHbBmFoQ6DXzFE1FB+RDP4ULrpoZXt6f'set @password = convert(varbinary(256),N'mypassword')set @input = hashbytes('sha1',cast('' as xml).value('xs:base64Binary(sql:variable(''@salt''))','varbinary(256)') + @password)set @hash = cast('' as xml).value('xs:base64Binary(xs:hexBinary(sql:variable(''@input'')))','varchar(64)')\[/code\]that could be used for Simple Membership.
 
Back
Top