Dim Ins As InputStream
Dim Outs, Out2 As OutputStream
Dim data() As Byte
Dim k As KeyGenerator
Dim cph as Cipher
Dim bc As ByteConverter
k.Initialize("DES")
k.KeyFromBytes(bc.HexToBytes("8512851A5CF27849"))
InitializeCipher(cph, "DES")
cph.InitialisationVector = "8512851A5CF27849"
Outs.InitializeToBytesArray(100)
File.Copy2(Ins, Outs)
data = Starter.cph.Encrypt(Outs.ToBytesArray, k.key, True)
Out2 = File.OpenOutput(cdestino, fdestino, False)
Out2.WriteBytes(data, 0, data.length)
Out2.Close
Outs.Close
Return bc.HexFromBytes(k.KeyToBytes)