tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: unable to login to second application because of password digest issues
Date Wed, 24 Dec 2008 00:28:53 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin,

Martin Gainty wrote:
> MessageDigester.digest() returns an array of bytes this will produce
> a DataType conversion error to/from String without constructing a new
> String datatype

Nobody is trying to to convert to/from a String inappropriately. The
code is correct. Your comment is confusing.

> the bigger problem is digest does 'padding'

No, it doesn't. SHA-1 does not do any padding. This comment is incorrect.

> so the only way to get back the original string is: keep the
> MessageDigest in a local instance variable then revert the padding to
> the local string with MessageDigest.reset() //then finally produce a
> String representation of the original contents with 
> MessageDigest.toString()

MessageDigest.toString does not return the original string, nor does it
return the hexadecimal-encoded string shown by the OP. Calling reset
does nothing, here. This comment is confusing AND incorrect.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklRgkUACgkQ9CaO5/Lv0PCIpQCePe8i1GypKrP+54Q2pfXLfRsb
e20AoJcXjd6MW2fjeiPBNDTjjpAi0i08
=1MPL
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message