Dim Bconv As ByteConverter
Dim key(0) As Byte
Dim data(0) As Byte
Dim ivb(0) As Byte
Dim c As Cipher
Dim su As StringUtils
Dim privatekey2 As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Dim pubkey() As Byte = su.DecodeBase64(privatekey2)
Dim publickey2 As String = "45eb2329869217a08c0858cc0d8bf81b4dc8df445e48e8a17e"
Dim privkey() As Byte = su.DecodeBase64(publickey2)
ivb= "xxxxxxxxxxxxxxxx".GetBytes("UTF8")
Dim xdata = "HELLO CBC"
Dim xdatebyte() As Byte = su.DecodeBase64(xdata)
Dim kg As KeyGenerator
Dim c As Cipher
c.Initialize("DESEDE/CBC/PKCS5Padding")
c.InitialisationVector = ivb
kg.Initialize("DESede")
kg.KeyFromBytes(pubkey)
Dim data() As Byte
data= c.Encrypt(xdatebyte,kg.Key,True)
kg.Initialize("DESede")
kg.KeyFromBytes(privkey)
Dim Ddata() As Byte
Ddata= c.Decrypt(data,kg.Key,True)