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
nobody - 12 Jan 2004 23:11 GMT
> Hi,
>
[quoted text clipped - 4 lines]
>
> TIA, Jim
just hex-encode the ciphertext?
Jim - 13 Jan 2004 17:00 GMT
Thx. I've gone ahead and converted one from vb to java. I'll post
somewhere when I get a chance.
- J
> > Hi,
> >
[quoted text clipped - 6 lines]
>
> just hex-encode the ciphertext?
Michael Amling - 13 Jan 2004 14:32 GMT
> 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.
You could just take the binary and convert it to base 64. If the base
64 text is to be used as file names, it would be better to use '.' and
'_' instead of base 64's standard '/' and '+'.
--Mike Amling
Roedy Green - 19 Jan 2004 22:06 GMT
> 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.
You take the bytes you get out of the cipher and feed them to a base64
encoder. See http://mindprod.com/jgloss/base64.html
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.