Base64 encode in VB6, decode in Java PROBLEM!!!

olegsobol_at_gmail.com
Date: 12/20/04


Date: 20 Dec 2004 10:23:46 -0800

Hi, all!

I really need some help here. I am not big on encoding/decoding stuff,
especially cross-platform.

Currently, I need to encode/encrypt a URL QueryString which I create in
VB6 (the URL is send to the user via Email). Now the web page is
written in Java (JSP - I hava no choice over this!!)... So I need to
decrypt the QueryString in Java.

I can do it on the same platform no problem (either VB6 or Java), but
when it comes to cross-platform I am having a problem.

I use CAPICOM object to encode the string, I looked all over, for
decoding samples in Java, but all were inconclusive. I also tried
suggestions like using EnvelopedData, to no avail.
Here is my encoding code in VB6 (using CAPICOM.dll):

' Declare and initialize an EncryptedData object.
Dim objEncrpt As New CAPICOM.EncryptedData

'Declare the string that will hold the encrypted message.
Dim encrypted_Qstring As String
objEncrpt.Algorithm.Name = CAPICOM_ENCRYPTION_ALGORITHM_DES

objEncrpt.Algorithm.KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_128_BITS

objEncrpt.SetSecret ("Test")

objEncrpt.Content = "Encoding test..."

encrypted_Qstring = objEncrpt.Encrypt(CAPICOM_ENCODE_BASE64)

PLEASE, PLEASE help... I would like to see an example of decoding a VB6
encoded string in Java

Thanks in advance,
Sincerely,
Oleg



Relevant Pages

  • Re: Help me!! Why java is so popular
    ... String or StringBuffer? ... keep in mind I knew NOTHING about Java. ... The language accepted it, no warnings, and thus I ... in some native assemblers you can peruse the instruction ...
    (comp.lang.java.programmer)
  • Re: question about assigning null to a reference object
    ... String getAuthor() ... void setAuthor ... b.setTitle("Thinking in Java 4th Edition"); ...
    (comp.lang.java.help)
  • Pondering the dev tool landscape from an outsider
    ... best path for continuing development on an existing VB6 application. ... Java port leveraging the Netbeans RCP. ... Cross platform. ...
    (borland.public.delphi.non-technical)
  • Re: Java questions: Urgent
    ... why I would expect almost any Java programmer to be able to answer ... Which is the main reason I "butted" in a bit.. ... on the characters in the String. ... > therefore naturally cover all the basics, or they have missed out badly ...
    (comp.lang.java.programmer)
  • Re: A C++ Whishlist
    ... with the C++ string classes as compared with the Java ones. ... You can keep you structs entirely ... The simple separation of interface and implementation that header files ...
    (comp.lang.cpp)