Sample Visual Basic
Code to 3DES decrypt a file:
Where Cryptocx1 is an instance of a Cryptocx Control.
''
'' 3DES Encrypt a File
''
Dim theResult As String
Dim Cryptocx As New EasyByte_Software.Cryptocxv7
Cryptocx.LicenseKey = "DEMO"
Cryptocx.DESKey1 = Des3Key1.Text
Cryptocx.DESKey2 = Des3Key2.Text
Cryptocx.DESKey3 = Des3Key3.Text
Cryptocx.SourceFile = txt3DESSourceFile.Text
Cryptocx.DestinationFile = txt3DESDestinationFile.Text
theResult = Cryptocx.TripleDESFileEncrypt
'' Check to see what has happened (if the encryption went ok without errors)
''
If theResult = "TRUE" Then
'' Ok, the Encryption went well with no errors
Else
MsgBox theResult
End If
'' Free up Memory Resources
''
Set Cryptocx = Nothing |