× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Franco later sent his code, which converts the byte array into a
String of hex characters, two characters per byte, thus 40 characters
for the 20-byte array generated by MessageDigest.digest().

Brett

On Thu, 10 Feb 2005 17:08:04 +0000, Niall.Smart@xxxxxxxxxxxxxxx
<Niall.Smart@xxxxxxxxxxxxxxx> wrote:
> Is SecurityHandler.encryptToString() and IBM specific extension?  I
> couldn't find mention of it anywhere...

> On Wed, 09 Feb 2005 20:05:26 +0100, Franco Biaggi <fbiaggi@xxxxxxxxxx>
> wrote:
> > this is possible, due to data conversions...
> > try to store the passwords in plain text like:
> >
> > String encrypted_pwd = SecurityHandler.encryptToString( enteredPassword
> );
> 
> The only problem with this method is that the Strings generated are 40
> characters long (I just ran a test case), and the password field in
> the database is only 25 characters long. I'm trying to change the
> method of encryption without changing the database. We are installed
> in hundreds of locations and updating the AS400 library is only done
> when absolutely necessary.
> 
> Is there a way to pack these bytes closer and still use Strings? I
> realize that packing them as single characters is what is giving me
> the headache in the first place.
> 
> If I have to, I'll change the field length, but this would be a last
> resort, and would delay the change for at least 6 months.

-- 
Brett Slocum
<slocum@xxxxxxxxxxxxxx>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.