You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Pingili, Madhupal" <MP...@BBandT.com> on 2003/10/01 15:29:03 UTC

Character Encryption on ASP page and decrypt in a Struts action

Hi All,
I am looking for a proper character encryption technique.
I need to encrypt a string like "A00123" on a ASP page and decrypt
in a Struts Action (or a Util class used in an action).

I have used 2 keys(1010 and 10101010) on each character to encrypt on a ASP
page
and decrypt in a Util class used in a Struts action and results are as
follows:
1. Using 1010: First 3 chars in string "A00123" result in "???" and next 3
chars as "123".
    Summary: encrypt("A00123") on a ASP page = "123+456+456+789+134+532" 
                    decrypt("123+456+456+789+134+532") in Java Util class =
"???123"  

2. Using 10101010: First char in string "A00123" result in "A" and next 4
chars as "????????" and last char as "3".
    Summary: encrypt("A00123") on a ASP page =
"10101123+10102456+10102456+10103789+10102134+10102532" 
 
decrypt("10101123+10102456+10102456+10103789+10102134+10102532") in Java
Util class = "A????????3" 

Can anyone give any ideas how to implement this successfully?

Thanks in advance, 

Reddy


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org