NoobChain-Tutorial-Part-2
NoobChain-Tutorial-Part-2 copied to clipboard
java.security.NoSuchProviderException No such provider: BC
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());
https://github.com/CryptoKass/NoobChain-Tutorial-Part-2/blob/a40ba474e090ce4af62b7230373d7446dcf20d3a/src/noobchain/Wallet.java#L21
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>