By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,737 Members | 1,971 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,737 IT Pros & Developers. It's quick & easy.

Need java class for encrypting to ascii printable chars

P: n/a
Jim
Hi,

Does anyone know of an available java class that will encrypt to
cipher text consisting of only printable ascii characters? One of the
things I need it for is to encrypt strings that will then be used as
filenames.

TIA, Jim
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
nos

"Jim" <ji******@hotmail.com> wrote in message
news:94**************************@posting.google.c om...
Hi,

Does anyone know of an available java class that will encrypt to
cipher text consisting of only printable ascii characters? One of the
things I need it for is to encrypt strings that will then be used as
filenames.

TIA, Jim

maybe you can use this
it converts binary to base64 which consists
of only printable characters

// Convert a byte array to base64 string
byte[] buf = new byte[]{0x12, 0x23};
String s = new sun.misc.BASE64Encoder().encode(buf);
Jul 17 '05 #2

P: n/a
Jim
Thanks for the tip. I've gone ahead and converted one written in vb
over to java. Seems to work pretty well so far. I'll post it
somewhere when I get a chance.

- Jim

"nos" <no*@nospam.com> wrote in message news:<icDMb.36004$xy6.89009@attbi_s02>...
"Jim" <ji******@hotmail.com> wrote in message
news:94**************************@posting.google.c om...
Hi,

Does anyone know of an available java class that will encrypt to
cipher text consisting of only printable ascii characters? One of the
things I need it for is to encrypt strings that will then be used as
filenames.

TIA, Jim

maybe you can use this
it converts binary to base64 which consists
of only printable characters

// Convert a byte array to base64 string
byte[] buf = new byte[]{0x12, 0x23};
String s = new sun.misc.BASE64Encoder().encode(buf);

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.