2012-02-16, 02:01 PM
(2012-02-16, 12:16 AM)Jammerx2 Wrote: [ -> ](2012-02-15, 11:08 PM)Tom K. Wrote: [ -> ]* Tom K. states, however, he is having trouble making a MD5 function in vb that matches PHP's
* Jammerx2 hasn't tested this, but it should work:
Private Function md5(ByVal s As String) As String Dim Md5 As New MD5CryptoServiceProvider() Dim bytes() As Byte = Md5.ComputeHash(s) return System.Text.Encoding.Default.GetString(bytes) End Function
* Tom K. got it to work in the end
* Tom K. looked at the byte array and noticed it was adding 5 or 6 null bytes to the end of the string
* Tom K. had to tell it to remove them first
* Tom K. will probably release a dev copy of the API today, after he adds a bit more to it, and makes a sample application