Hi, I’m looking to authenticate against Samba’s Users table using the built-in password. I’m wondering what hashing algorithm was used. It looks like all passwords are prepended with “SPHASH”. Is that part of the hash or some sort of other data?
Are you sure you’re not thinking of PIN? PINs are indeed not encrypted (although they should be) but passwords are. Passwords are used for API access. I also want to use it for my web app so employees can experience SSO.
Looks like the prepended data “$SPHASH$V1$” is used to identify the password version, perhaps for future releases, backward compatibility, etc. The data is removed via the Replace() method and then the remaining data is split at the remaining $ which gives an array of [10000,hash…]. Now I’m wondering what the 10000 means haha.
Hi Thanks Memo. I see there’s a hash_pbkdf2 function for php. I’m having trouble translating the C# to php though. Specifically how the SaltSize variable is derived and the Array.Copy method (5 arguments?).