I've a code written in vbscript, which is already in use ..for encryption/decryption
of some data ... now, i want to convert the code into Java, and the converted
code should work same as the existing vbscript code...i mean it should de
giving me the same result...as i have to use the data already stored using
the vbscript code.

I'll write down the vbscript code over here... hope somebody can help me..


========
Sub Encrypt(Secret, Password)
'// "Secret" is the string to encrypt or decrypt. //
'// "PassWord" is the password with which to encrypt the string. //
Dim L, X, Char
L = Len(Password)
For X = 1 To Len(Secret)
Char = Asc(Mid(Password, (X Mod L) - L * ((X Mod L) = 0), 1))
Mid(Secret, X, 1) = Chr(Asc(Mid(Secret, X, 1)) Xor Char)
Next
End Sub
========

thanks in advance...cvshah.