Yes, this makes sense... I didn't grasp the meaning in the documentation...
Back to the code... thanks. Rob ----- Original Message ----- From: "Shawn Anderson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 21, 2002 6:22 AM Subject: [xmail] Re: MD5 digest.. > > It doesn't look like you are using the time information provided by > Xmail on connection. If you look at the docs you need to encode the > password with the time information in the following format: > <TimeStamp>password > > So it would look like: > > byte[] bytes = Encoding.ASCII.GetBytes(connection.timestamp + > login.Password); > > Remember the the "<" and ">" must be included in the timestamp string. > > Shawn > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > On Behalf Of Robert J. Lebowitz > Sent: Thursday, November 21, 2002 6:41 AM > To: [EMAIL PROTECTED] > Subject: [xmail] Re: MD5 digest.. > > > > > > > The string I'm sending looks like this: > > > "root" "#6E6BC4E49DD477EBC98EF4046C067B5F" > > > > How do you build the source string that produces : > > > > #6E6BC4E49DD477EBC98EF4046C067B5 > > > > private string GetMD5Digest() { > > HashAlgorithm md5 = new MD5CryptoServiceProvider(); > > byte[] bytes = Encoding.ASCII.GetBytes(login.Password); > > byte[] hash = md5.ComputeHash(bytes); > > char[] delimiter = { '-' }; > > string[] hexes = BitConverter.ToString(hash).Split(delimiter); > > return String.Join("", hexes); > > } > > > > In case you're wondering why I use the Split, Join methods, C#'s > BitConverter class method ToString takes a byte array and displays it as > a Unicode string with the hex values separated by dashes. I am simply > removing the dashes from the string and concatenating the resulting > string array into a string. > > > > Rob > > > - > To unsubscribe from this list: send the line "unsubscribe xmail" in the > body of a message to [EMAIL PROTECTED] For general help: send the > line "help" in the body of a message to [EMAIL PROTECTED] > > > > - > To unsubscribe from this list: send the line "unsubscribe xmail" in > the body of a message to [EMAIL PROTECTED] > For general help: send the line "help" in the body of a message to > [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe xmail" in the body of a message to [EMAIL PROTECTED] For general help: send the line "help" in the body of a message to [EMAIL PROTECTED]
