File tree Expand file tree Collapse file tree 6 files changed +13
-6
lines changed
springboot-starter-data-fast
springboot-starter-id-generator
springboot-starter-security-jwt
src/main/java/com/codingapi/springboot/framework/crypto Expand file tree Collapse file tree 6 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1212
1313 <groupId >com.codingapi.springboot</groupId >
1414 <artifactId >springboot-parent</artifactId >
15- <version >1.5.11 </version >
15+ <version >1.5.12 </version >
1616
1717 <url >https://github.com/codingapi/springboot-framewrok</url >
1818 <name >springboot-parent</name >
Original file line number Diff line number Diff line change 55 <parent >
66 <artifactId >springboot-parent</artifactId >
77 <groupId >com.codingapi.springboot</groupId >
8- <version >1.5.11 </version >
8+ <version >1.5.12 </version >
99 </parent >
1010 <modelVersion >4.0.0</modelVersion >
1111
Original file line number Diff line number Diff line change 55 <parent >
66 <artifactId >springboot-parent</artifactId >
77 <groupId >com.codingapi.springboot</groupId >
8- <version >1.5.11 </version >
8+ <version >1.5.12 </version >
99 </parent >
1010 <modelVersion >4.0.0</modelVersion >
1111
Original file line number Diff line number Diff line change 66 <parent >
77 <artifactId >springboot-parent</artifactId >
88 <groupId >com.codingapi.springboot</groupId >
9- <version >1.5.11 </version >
9+ <version >1.5.12 </version >
1010 </parent >
1111
1212 <artifactId >springboot-starter-security-jwt</artifactId >
Original file line number Diff line number Diff line change 55 <parent >
66 <groupId >com.codingapi.springboot</groupId >
77 <artifactId >springboot-parent</artifactId >
8- <version >1.5.11 </version >
8+ <version >1.5.12 </version >
99 </parent >
1010 <artifactId >springboot-starter</artifactId >
1111
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public class RSA {
1313
1414 public static final String KEY_ALGORITHM = "RSA" ;
1515
16- private final PrivateKey privateKey ;
16+ private PrivateKey privateKey ;
1717
1818 private final PublicKey publicKey ;
1919
@@ -37,11 +37,18 @@ public RSA(PrivateKey privateKey, PublicKey publicKey){
3737 }
3838
3939 public RSA (byte [] privateKey , byte [] publicKey ) throws Exception {
40+ Security .addProvider (new BouncyCastleProvider ());
4041 this .privateKey = this .getPrivateKeyFromString (privateKey );
4142 this .publicKey = this .getPublicKeyFromString (publicKey );
4243 }
4344
4445
46+ public RSA (byte [] publicKey ) throws Exception {
47+ Security .addProvider (new BouncyCastleProvider ());
48+ this .publicKey = this .getPublicKeyFromString (publicKey );
49+ }
50+
51+
4552 /**
4653 * Generate key which contains a pair of privae and public key using 2048 bytes
4754 *
You can’t perform that action at this time.
0 commit comments