cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leon Widdershoven <...@dds.nl>
Subject Re: md5 in XSP
Date Wed, 14 Apr 2004 11:42:47 GMT
Another non-answer (I had something similar a while ago), if the passwords
are stored in a MySQL database and you just wish to verify the password
you could use MySQL's MD5() function (maybe also supported by other db's).

This is of course of no use at all if you're comparing with encoded pw's
in a file:)

As a side pointer, the jboss getting started uses as an alternative to
openssl dgst -md5 -binary | openssl base64 (for the command line)
the java program:
java -classpath jbosssx.jar org.jboss.security.Base64Encoder <pw> MD5

I think using the Base64Encoder of jboss could also be an option. (I tested
it in Java code some time ago and it does work).

Leon

Jorg Heymans wrote:
> Not really answering your question sorry ;)
> 
> If adding an extra lib to your webapp is an option, then commons-codec 
> (http://jakarta.apache.org/commons/codec/) might be what you are looking 
> for to do do MD5 checksums the "jakarta" way.
> 
> hth
> Jorg
> 
> Joose Vettenranta wrote:
> 
>> Hi,
>>
>> I'm trying to create md5-chechsum in XSP.
>>
>> I already have like this:
>>
>>     java.security.MessageDigest md = 
>> java.security.MessageDigest.getInstance("MD5");
>>     byte[] array = md.digest(password.getBytes());
>>
>> And it seems to work OK. But problem is, howto get that byte-array to 
>> hex-string?
>>
>> I found that in catalina there is org.apache.catalina.util.MD5Encoder 
>> which seems to do what I want, but I can't use that in XSP.
>>
>> I've tried
>> <xsp:structure>
>>  <xsp:include>org.apache.catalina.util.MD5Encoder</xsp:include>
>> </xsp:structure>
>>
>> but it won't even compile.
>>
>> So, how to get that working?
>>
>> - Joose
>>
>> -- 
>> "Always remember that you are unique, just like everyone else!"
>> * http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

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


Mime
View raw message