You are not logged in.

#1 2011-10-06 14:36:54

pokraka
Member
From: Brussels
Registered: 2009-01-15
Posts: 63

Using Bouncy Castles in Java

Hi,

Basically I just need to compile this code :

import java.security.*;
import javax.crypto.*;

public class BlockCipherEngine {
    public static void main(String[] args) {
        Security.addProvider( new org.bouncycastle.jce.provider.BouncyCastleProvider() );
        Cipher cipher = Cipher.getInstance("AES", "BC");
    }
}

But I get the following :

package org.bouncycastle.jce.provider does not exist

I installed bcprov and added /usr/share/bcprov.jar to my $CLASSPATH.
What should I do ?

Thanks.

Offline

#2 2011-10-06 14:52:08

sunckell
Member
Registered: 2009-11-16
Posts: 6

Re: Using Bouncy Castles in Java

bcprov installs to /usr/share/java/bcprov.jar  not /usr/shar/bcprov.jar

adjust your CLASSPATH and try again?

Offline

Board footer

Powered by FluxBB