[VB6 equivalent: MD5_AddBytes]
Dim strDigest As String Dim abData(1) As Byte Dim fIsOK As Boolean Dim oMd5 As Md5 = Md5.Instance() fIsOK = oMd5.Init() If Not fIsOK Then Console.WriteLine("ERROR: Failed to set context") Exit Sub End If ' Set up a test array of bytes abData(0) = Asc("a") abData(1) = &H62 ' same as Asc("b") ' Add mixture of bytes and strings oMd5.AddData(abData) oMd5.AddData("c") ' Set strDigest to be 32 chars strDigest = oMd5.HexDigest() Console.WriteLine(strDigest)
See Also:
Md5.AddData Method (Byte[])