I believe that this should do the job, although it's untested.
vb.net Code:
  1. Private Function HexToBytes(hex As String) As Byte()
  2.     If hex.Length Mod 2 <> 0 Then
  3.         'Add a leading 0.
  4.         hex = "0" & hex
  5.     End If
  6.  
  7.     Dim index = 0
  8.     Dim bytes As New List(Of Byte)
  9.  
  10.     Do Until index = hex.Length
  11.         bytes.Add(Convert.ToByte(hex.Substring(index, 2), 16))
  12.     Loop
  13.  
  14.     bytes.Reverse()
  15.  
  16.     Return bytes.ToArray()
  17. End Function