Skip to content

java.security.NoSuchProviderException No such provider: BC #10

Description

@mhimehdi

Hi Kass,
in some cases you may have the exception NoSuchProviderException BC, you'd better surround your code with try/catch statement and handle this exception by adding this portion of the code:
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

KeyPairGenerator keyGen = KeyPairGenerator.getInstance("ECDSA","BC");

also please add in the readme file: the maven dependency for maven users:

<dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <version>1.47</version>
        </dependency>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions