[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [iaik-jce] GeneralSecurityException()
Please be sure to include jdk11x_update.jar in your CLASSPATH.
Even so, because of the class hierarchy in JDK 1.1 you cannot catch those
exceptions with a GeneralSecurityException. You will have to catch
NoSuchAlgorithmException, NoSuchProviderException, etc. separately unless
you upgrade to JDK 1.2.
Regards,
Andreas Sterbenz mailto:Andreas.Sterbenz@iaik.tu-graz.ac.at
-----Ursprüngliche Nachricht-----
Von: <sampo.pasanen@vtt.fi>
An: <iaik-jce@iaik.tu-graz.ac.at>
Gesendet: Dienstag, 14. September 1999 12:22
Betreff: [iaik-jce] GeneralSecurityException()
> Hello!
>
> I'm using IAIK to implement a simple program for encrypting files. I'm
> using VCafé3.0c on Windows NT platform with JDK1.1.7.
>
> The problem is that I got this message when compiling the code:
>
> Error: C:\VisualCafe\Projects\JCETest\IAIKEncrypt.java(122): Class
> java.security.GeneralSecurityException not found in try
> Error: C:\VisualCafe\Projects\JCETest\IAIKEncrypt.java(23): Class
> java.security.GeneralSecurityException not found in IAIKEncrypt
> 2 error(s), 0 warning(s)
>
> GeneralSecurityException is a Java 2 class. I couldn't find out what
causes
> this error to occur or can it be evaded somehow if using JDK1.1.
>
> Here is the try-block that the error refers to:
>
> try
> {
> Cipher cipher =
Cipher.getInstance("Blowfish/ECB/PKCS5Padding",
> "IAIK");
>
> cipher.init(Cipher.DECRYPT_MODE, key);
>
>
> FileInputStream in = new FileInputStream(inputFile);
> FileOutputStream fileOut = new
FileOutputStream(outputFile);
> CipherOutputStream cipOut = new CipherOutputStream(fileOut,
> cipher);
> byte[] buffer = new byte[bufferSize];
>
> int length;
> while((length = in.read(buffer)) > -1)
> cipOut.write(buffer, 0, length);
>
> in.close();
> cipOut.close();
> }
>
> Thanks for any help,
> Sampo
smime.p7s