gnu-crypto-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Crypto] problem with javax-crypto.jar


From: Raif S. Naffah
Subject: Re: [GNU Crypto] problem with javax-crypto.jar
Date: Tue, 29 Jul 2003 05:52:27 +1000
User-agent: KMail/1.5.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Mon, 28 Jul 2003 06:27 pm, MARIOCQ wrote:
> Hello:
>
>    I am using the program that appears in the following page:
> http://curl.haxx.se/rfc/ntlm.html
> and I am getting the next error:
>
> C:\test>java -cp
> c:\test\javax-crypto.jar;c:\test;c:\test\gnu-crypto.jar Responses
> Exception in thread "main" java.security.NoSuchAlgorithmException:
> DES/ECB/NoPad
> ding not found
>         at javax.crypto.Cipher.getInstance(Cipher.java:160)
>         at Responses.lmHash(Responses.java:111)
>         at Responses.getLMResponse(Responses.java:33)
>         at Responses.main(Responses.java:28)
>
> Any idea?

many :-)

/usr/java/jdk1.3.1_07/bin/java \
- -Dfile.encoding=UTF-8 \
- -classpath /usr/java/jdk1.3.1_07/jre/lib/i18n.jar:\
/usr/java/jdk1.3.1_07/jre/lib/rt.jar:\
/usr/java/jdk1.3.1_07/jre/lib/javaplugin.jar:\
/usr/java/jdk1.3.1_07/jre/lib/sunrsasign.jar:\
/data/workspace/test/classes:\
/data/workspace/cvs/gnu-crypto/lib/gnu-crypto.jar:\
/data/workspace/cvs/gnu-crypto/lib/javax-crypto.jar \
Responses

getLMResponse(gnu-crypto rulez, 0x000..0)=33DDA89AD6F25942 
F56FF6925199CCBA FC2BB363F6906477 


add the following imports and code to your copy of Responses:

import gnu.crypto.jce.GnuCrypto;
import gnu.crypto.util.Util;

...
public class Responses {

   public static final void main(String[] args) throws Exception {
      Security.addProvider(new GnuCrypto());
      System.out.println("getLMResponse(gnu-crypto rulez, 0x000..0)="
            +Util.dumpString(
                  getLMResponse("gnu-crypto rulez",
                  new byte[] {0,0,0,0,0,0,0,0})));
   }


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE/JX77+e1AKnsTRiERA1MQAJ9n7k5BYss1PXlg3KO6g8dAAPi87QCg7AO0
hnPF5gqJ8QwAykxy8AyBu4I=
=/BXw
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]