View Single Post
Old 02-14-2006, 12:13 PM   #1 (permalink)
brodock
Forum Expert
 
Join Date: Jan 2003
Posts: 564
Default Help trying to convert C# account crypto to PHP

Ok, i have a need to convert the way runuo crypto it's passwords...

Code:
		public static string HashPassword( string plainPassword )

		{

			if ( m_HashProvider == null )

				m_HashProvider = new MD5CryptoServiceProvider();



			if ( m_HashBuffer == null )

				m_HashBuffer = new byte[256];



			int length = Encoding.ASCII.GetBytes( plainPassword, 0, plainPassword.Length > 256 ? 256 : plainPassword.Length, m_HashBuffer, 0 );

			byte[] hashed = m_HashProvider.ComputeHash( m_HashBuffer, 0, length );



			return BitConverter.ToString( hashed );

		}
i have no knowledge about MD5CryptoServiceProvider... but i know how to create a MD5 hash using php with a string...

is it possible to create the same MD5 hash that C# creates using php?
__________________
UO Central: O Mistério do Oculto
(Free Shard Brasileiro)

brodock is offline   Reply With Quote