Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!aioe.org!.POSTED!not-for-mail From: B1ll Gat3s Newsgroups: comp.lang.java.programmer Subject: Re: Simple alphanumeric "encryption"? Date: Mon, 17 Oct 2011 21:33:38 -0400 Organization: 0wnz0ring j00r b0x s1nce 1987 Lines: 34 Message-ID: References: NNTP-Posting-Host: 9CJ8/eolYJFg00xJHvT4XQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (CYGWIN_NT-6.0/1.5.22(0.156/4/2) (i686)) Hamster/2.0.2.2 X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8934 On 17/10/2011 3:16 AM, Qu0ll wrote: > I need to be able to encrypt/code an arbitrary string of up to about 50 > alphanumeric characters into a string that also contains only > alphanumeric characters. All of the encryption algorithms I have looked > result in strings with non-ASCII characters in them (when the resulting > bytes are turned into a string) which is not suitable. > > Is there a simple way to do this? It must be able to successfully be > decrypted as well but doesn't need to be very sophisticated or extremely > secure. Option 1: Blowfish, or whatever, followed by binhex or whatever. Option 2: A canned solution such as PGP/GPG which can be set to "ascii armor" mode. The graphical frontend Kleopatra has a checkbox for this. If you've ever seen an email or news post with -- BEGIN PGP PUBLIC SIGNATURE -- ajkdg38X3nmfnsa2906NJq ... -- END PGP PUBLIC SIGNATURE -- or similarly, the encrypted hash used as a signature was generated with these tools. I think they might use nonalphanumeric ASCII characters, though, so if your requirement is really that it be alphanumeric rather than just 7-bit clean then these won't work without modification. Open source implementations exist though, and perhaps you can restrict the character set in a modified version. -- A fatal exception 0E has occurred at 0028:C0011E36 in VXD VMM(01) 00010E36. The current application will be terminated. * Press any key to terminate the current application.