velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Baughman <baugh...@utdallas.edu>
Subject Re: Password admin with velocity
Date Fri, 18 Mar 2005 17:15:49 GMT
You can't do this in Velocity.  Check out the java.security classes.
I'm doing MD4:

import gnu.crypto.jce.GnuCrypto;

import java.security.MessageDigest;
import java.security.Security;

   public static byte[] encryptMD4(String s) throws Exception {
      Security.addProvider(new GnuCrypto());
      MessageDigest md4 = MessageDigest.getInstance("MD4");
      return md4.digest(s.getBytes());
   }

Look up gnu.crypto in Google.

Barbara Baughman
X2157

On Fri, 18 Mar 2005, Doug Carter wrote:

>
> Hi all,
>
> Has anyone implemented a JDBCRealm and MD5 encrypted passwords with a
> velocity app? I've got everything working, with one exception. I've got
> some admin pages that need a way to encrypt clear text passwords from
> an HTML form before storing them in the database.
>
> I've Googled this and searched many mailing list archives with no hits. I
> would have thought this would be a pretty common feature.
>
> Has anyone done this? Any ideas/pointers?
>
> TIA,
>
> Doug Carter
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message