Thread View: comp.lang.java.programmer
2 messages
2 total messages
Started by Thorsten Meininger
Sat, 01 Feb 2003 09:51
How to encrypt String to only printable characters ???
Author: Thorsten Meininger
Date: Sat, 01 Feb 2003 09:51
Date: Sat, 01 Feb 2003 09:51
13 lines
1793 bytes
1793 bytes
I need an encryption method to encrypt (and decrypt) a contents of a text string to a target string which contains only printable characters (or even characters A-Z,a-z,0-9). How do I do that ? As far as I know the Jave Encrytion extension JCE doesn't offer such a method. If I use e.g. Blowfish in JCE it produces a ciphertext which contains Linebreaks (<CR>). So it is not suitable. It is not required to be ultra secure. Does someone know an easy way to accomplish that ? Thank you Thorsten
Re: How to encrypt String to only printable characters ???
Author: Michael Mainguy
Date: Sat, 01 Feb 2003 17:44
Date: Sat, 01 Feb 2003 17:44
19 lines
2021 bytes
2021 bytes
t_meining@hotmail.com (Thorsten Meininger) wrote in message news:<b1g5a3$7bt$05$1@news.t-online.com>... > I need an encryption method to encrypt (and decrypt) a contents of a text string to > a target string which contains only printable characters (or even characters A-Z,a-z,0-9). > How do I do that ? > > As far as I know the Jave Encrytion extension JCE doesn't offer such a method. > If I use e.g. Blowfish in JCE it produces a ciphertext which contains Linebreaks (<CR>). > So it is not suitable. > > It is not required to be ultra secure. > Does someone know an easy way to accomplish that ? > > Thank you > Thorsten A really easy way would be to base64 encode the encrypted String. Of course, if you just want to obfuscate the String you could just use the base64 encoding to start with and be done with it.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads