# [Fwd: Problem installing provider for JDK 1.2 beta 3 and JCE]

Beth Whitman (beth.whitman@Sun.COM)
Mon, 06 Apr 1998 16:21:26 -0700

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Roman: "(no subject)"
- Previous message: Charlie Lai: "Re: SecureRandom and digital signature"

    Date: Mon, 06 Apr 1998 16:21:26 -0700

    From: Beth Whitman <beth.whitman@Sun.COM>

    To: java-security@java0.javasoft.com

    Subject: [Fwd: Problem installing provider for JDK 1.2 beta 3 and JCE]

Hey Java-Security

Do you have a solution for this user?

Thanks
Beth
Lisa Friendly wrote:
>
> Beth,
>
> Can you handle this or direct it to the right person?

> Thanks, Lisa
>
> ------------- Begin Forwarded Message -------------
>
> From: "Briercheck, Scott" <brierchecks@msx.upmc.edu>
> To: "'Lisa Friendly'" <lisa.friendly@Eng>
> Subject: Problem installing provider for JDK 1.2 beta 3 and JCE
> Date: Mon, 6 Apr 1998 17:52:28 -0400
> MIME-Version: 1.0
>
> Lisa,
>
> Hi, I picked up your email off the Sun web pages and
> I hoped you might be able to steer me in the right direction. I
> upgraded to JDK 1.2 beta 3 today and installed the JCE to start learning
> it. But after following the directions for installing the "provider", I
> went to compile a simple test program and I get an error that looks like
> either a path problem or perhaps a registry problem. It tells me the
> following:
>
> "Class or Interface Declaration expected". Then it proceeds to error
> out on every JCE call in my program.
>
> It seems that it is not finding my static entry of the provider in
> \lib\security\security.java. Any suggestions about what is wrong? I
> followed the procedures outlined on Java pages dated 3/23/98 for
> installing providers.
>
> Thanks,
>
> -Scott Briercheck
> UPMC Diversified Services
>
> ps: Here's the sample program I'm trying to compile, its a do-nothing
> program just to see if I can get some JCE calls to compile.
>
> I've set CLASSPATH on NT 4.0 to
> c:\jdk1.2beta3\jce12-ea2-dom\lib\jce12-ea2-dom.jar;
>
> I've added the following into \lib\security\java.security
> security.provider.2=com.sun.crypto.provider.SunJCE
>
> import java.io.*;
> import java.security.*;
>
> Provider sunJCE = new com.sun.crypto.provider.SunJCE();
> Security.addProvider(sunJCE);
>
> public class scrypt2 {
>
> public static void main(String[] args)
> {
> try
> {
> KeyGenerator keygen =
> KeyGenerator.getInstance("DES");
> SecretKey desKey = keygen.generateKey();
> Cipher desCipher;
> // Create the cipher
> desCipher =
> Cipher.getInstance("DES/ECB/PKCS5Padding");
> // Initialize the cipher for encryption
> desCipher.init(Cipher.ENCRYPT_MODE, desKey);
> }
>
> catch (Exception e)
> {
> System.out.println(e.toString());
> }
> }
> }
>
> ------------- End Forwarded Message -------------

- Next message: Roman: "(no subject)"
- Previous message: Charlie Lai: "Re: SecureRandom and digital signature"