What hashing does umbraco use in its member provider?

I need to move users from Umbraco to another CMS, and all their passwords are hashed. I would like users to not reload their passwords and would like to implement the same hashing algorithm in the new CMS.

What type of hashing does Umbraco use in its member provider?

eg

"W477AMlLwwJQeAGlPZKiEILr8TA =" is the "hash" hash

I cannot use .net and will have to re-implement this hashing in javascript.

UPDATED ANSWER:

//not sure why I can't use cryptojs utf16LE function //words = CryptoJS.enc.Utf16LE.parse("test"); //utf16 = CryptoJS.enc.Utf16LE.stringify("test"); function str2rstr_utf16le(input) { var output = [], i = 0, l = input.length; for (; l > i; ++i) { output[i] = String.fromCharCode( input.charCodeAt(i) & 0xFF, (input.charCodeAt(i) >>> 8) & 0xFF ); } return output.join(''); } var pwd = str2rstr_utf16le("test"); var hash = CryptoJS.HmacSHA1(pwd, pwd); var encodedPassword = CryptoJS.enc.Base64.stringify(hash); alert(encodedPassword); 
+4
source share
3 answers

To be more specific, it uses this particular class to hash the password. This should serve as a simple implementation example.

As Martinn noted, Umbraco uses a standard vendor model. That way, you can easily access it through abstract classes, and create your own membership provider implementation.

+5
source

Umbraco uses the ASP.NET membership provider model, which means that all abstract classes that are provided by Out-Of-The-Box with ASP.NET can access the Umbraco member. this link for more information on the ASP.NET membership provider.

+3
source

If you want to do this in C #, you can use the following hash method:

 public static string GetHash(string password) { byte[] passwordBytes = Encoding.Unicode.GetBytes(password); using (var hash = new HMACSHA1(passwordBytes)){ return Convert.ToBase64String(hash.ComputeHash(passwordBytes)); } } 
0
source

All Articles