Article View: comp.lang.java.programmer
Article #254Re: How to encrypt String to only printable characters ???
From: 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.
Technical Details
Message-ID:
<44538df9.0302010944.3ef462fb@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<b1g5a3$7bt$05$1@news.t-online.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a146,1d58af74c56e81d X-Google-Attributes: gid10a146,public X-Google-Thread: fa3e3,1d58af74c56e81d X-Google-Attributes: gidfa3e3,public X-Google-Thread: 109107,1d58af74c56e81d X-Google-Attributes: gid109107,public X-Google-Thread: 113ae9,1d58af74c56e81d X-Google-Attributes: gid113ae9,public X-Google-ArrivalTime: 2003-02-01 09:44:52 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: mainguym@mich.com (Michael Mainguy) Newsgroups: comp.lang.java.programmer,comp.lang.java.help,borland.public.jbuilder.ide,borland.public.jbuilder.compiler Subject: Re: How to encrypt String to only printable characters ??? Date: 1 Feb 2003 09:44:52 -0800 Organization: http://groups.google.com/ Lines: 19 Message-ID: <44538df9.0302010944.3ef462fb@posting.google.com> References: <b1g5a3$7bt$05$1@news.t-online.com> NNTP-Posting-Host: 68.61.196.223 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1044121492 11455 127.0.0.1 (1 Feb 2003 17:44:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 1 Feb 2003 17:44:52 GMT