
Encrypt Using Java, Decrypt using Visual Basic
Quote:
>Hi All,
>I have a web based solution for the QA of Radiotherapy. I also created
>a stand-alone software for working of the QA process in the case of
>unavailability of Internet. The stand-alone program works on Visual
>Basic. For this Visual Basic program to work it needs a configuration
>file that can be downloaded from web. As of now the configuration file
>is a simple text file. And everything works fine.
>The problem is I want the configuration to be encrypted so that no
>individual can make changes in the configuration file. So if I encrypt
>the configuration file using Java then the problems comes while
>decrypting using Visual Basic. Because I didn't find any encryption
>algorithm that does the above. Can anybody help solve the problem? Any
>other alternatives are appreciated.
>The basic problem in one statement is I want the configuration file to
>be unchanged by anybody.
>Thanks
You can ensure that a file will be *unchanged* and *undeleted* only if the
operating systems involved provide for user logins and strict permission
enforcement (NT, Linux, etc). Setting a file's attributes to read-only, hidden,
and system makes it harder for non-power users to find, change, or delete the
file under Win9x. Remember that expert users can delete almost any file in
Win9x with 3 or fewer lines of input at a DOS prompt.
You check for a file's contents being *changed* by using a checksum or a CRC
calculation.
You keep a file from being easily *read and understood* by encrypting it.
Simple encryption is easy if you're dealing with ASCII characters (single-byte).
XOR each byte with some value to create the encrypted file; XOR each byte with
the same value to decrypt the file.
If the java application can output ASCII text, then XOR (or something similar)
can provide (limited) encryption security and a checksum or CRC can provide
assurance that the file received is the same as the file sent (no damage in
transit).
Only operating system controls can ensure "the configuration file to
be unchanged by anybody."
VB3 source code: http://thelabwiz.home.mindspring.com/vbsource.html
VB6 source code: http://thelabwiz.home.mindspring.com/vb6source.html
VB6 - MySQL how to: http://thelabwiz.home.mindspring.com/mysql.html
Fix the obvious to reply by email.