For Programmers: Free Programming Magazines  


Home > Archive > Java Security > December 2004 > Base64 encode in VB6, decode in Java PROBLEM!!!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Base64 encode in VB6, decode in Java PROBLEM!!!
olegsobol@gmail.com

2004-12-20, 4:00 pm

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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com