Skip to content

Commit

Permalink
allow external BC lifecycle management
Browse files Browse the repository at this point in the history
  • Loading branch information
fcorneli committed Apr 17, 2018
1 parent 0dcffc1 commit e689a3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crypto/src/main/java/org/web3j/crypto/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public class Keys {
public static final int PRIVATE_KEY_LENGTH_IN_HEX = PRIVATE_KEY_SIZE << 1;

static {
Security.addProvider(new BouncyCastleProvider());
if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
Security.addProvider(new BouncyCastleProvider());
}
}

private Keys() { }
Expand Down

0 comments on commit e689a3d

Please sign in to comment.