Imports System.Security.Cryptography

Module Module1

    Sub Main()
        Dim TDES As TripleDESCryptoServiceProvider = New TripleDESCryptoServiceProvider

        Dump("Key", TDES.Key)
        Dump("IV", TDES.IV)
    End Sub

    Sub Dump(ByVal Name As String, ByVal Data() As Byte)
        Console.Write("Dim " + Name + " As Byte() = { ")

        Dim i As Integer

        For i = 0 To Data.Length - 1
            If i <> 0 Then
                Console.Write(", ")
            End If

            Console.Write(String.Format("&h{0:x}", Data(i)))
        Next

        Console.WriteLine(" }")
    End Sub

End Module
