Skip to content

Commit 721614e

Browse files
committed
Remove nimbus
1 parent 60a2f74 commit 721614e

29 files changed

+415
-426
lines changed

pom.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,14 @@
134134
<scope>test</scope>
135135
</dependency>
136136
<dependency>
137-
<groupId>com.nimbusds</groupId>
138-
<artifactId>nimbus-jose-jwt</artifactId>
139-
<version>9.9</version>
140-
<scope>compile</scope>
137+
<groupId>commons-codec</groupId>
138+
<artifactId>commons-codec</artifactId>
139+
<version>1.14</version>
140+
</dependency>
141+
<dependency>
142+
<groupId>com.fasterxml.jackson.core</groupId>
143+
<artifactId>jackson-databind</artifactId>
144+
<version>2.11.1</version>
141145
</dependency>
142146
<dependency>
143147
<groupId>org.abstractj.kalium</groupId>

src/main/java/com/danubetech/keyformats/JWK_to_PrivateKey.java

Lines changed: 37 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@
33
import java.security.interfaces.RSAPrivateKey;
44

55
import bbs.signatures.KeyPair;
6-
import com.danubetech.keyformats.jose.Curves;
6+
import com.danubetech.keyformats.jose.Curve;
7+
import com.danubetech.keyformats.jose.JWK;
8+
import com.danubetech.keyformats.jose.KeyType;
79
import com.danubetech.keyformats.jose.KeyTypeName;
810
import org.bitcoinj.core.ECKey;
911

1012
import com.danubetech.keyformats.keytypes.KeyTypeName_for_JWK;
11-
import com.nimbusds.jose.JOSEException;
12-
import com.nimbusds.jose.crypto.impl.RSAKeyUtils;
13-
import com.nimbusds.jose.jwk.Curve;
14-
import com.nimbusds.jose.jwk.JWK;
15-
import com.nimbusds.jose.jwk.KeyType;
16-
import com.nimbusds.jose.jwk.RSAKey;
1713

1814
public class JWK_to_PrivateKey {
1915

20-
public static Object JWK_to_anyPrivateKey(JWK jsonWebKey) throws JOSEException {
16+
public static Object JWK_to_anyPrivateKey(JWK jsonWebKey) {
2117

2218
KeyTypeName keyType = KeyTypeName_for_JWK.keyTypeName_for_JWK(jsonWebKey);
2319

@@ -37,94 +33,81 @@ else if (keyType == KeyTypeName.X25519)
3733
throw new IllegalArgumentException("Unsupported key type: " + keyType);
3834
}
3935

40-
public static RSAPrivateKey JWK_to_RSAPrivateKey(JWK jsonWebKey) throws JOSEException {
36+
public static RSAPrivateKey JWK_to_RSAPrivateKey(JWK jsonWebKey) {
4137

42-
if (! KeyType.RSA.equals(jsonWebKey.getKeyType())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKeyType());
38+
if (! KeyType.RSA.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
4339

44-
return ((RSAKey) jsonWebKey).toRSAPrivateKey();
40+
throw new RuntimeException("Not supported");
41+
// return ((RSAKey) jsonWebKey).toRSAPrivateKey();
4542
}
4643

47-
public static ECKey JWK_to_secp256k1PrivateKey(JWK jsonWebKey) throws JOSEException {
44+
public static ECKey JWK_to_secp256k1PrivateKey(JWK jsonWebKey) {
4845

4946
byte[] privateKeyBytes = JWK_to_secp256k1PrivateKeyBytes(jsonWebKey);
5047

5148
return ECKey.fromPrivate(privateKeyBytes);
5249
}
5350

54-
public static byte[] JWK_to_secp256k1PrivateKeyBytes(JWK jsonWebKey) throws JOSEException {
51+
public static byte[] JWK_to_secp256k1PrivateKeyBytes(JWK jsonWebKey) {
5552

56-
if (! KeyType.EC.equals(jsonWebKey.getKeyType())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKeyType());
53+
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
54+
if (! Curve.secp256k1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
5755

58-
com.nimbusds.jose.jwk.ECKey ecKey = (com.nimbusds.jose.jwk.ECKey) jsonWebKey;
59-
if (! Curve.SECP256K1.equals(ecKey.getCurve())) throw new IllegalArgumentException("Incorrect curve: " + ecKey.getCurve());
60-
61-
return ecKey.getD().decode();
56+
return jsonWebKey.getDdecoded();
6257
}
6358

64-
public static KeyPair JWK_to_BLS12381_G1PrivateKey(JWK jsonWebKey) throws JOSEException {
65-
66-
if (! KeyType.EC.equals(jsonWebKey.getKeyType())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKeyType());
59+
public static KeyPair JWK_to_BLS12381_G1PrivateKey(JWK jsonWebKey) {
6760

68-
com.nimbusds.jose.jwk.ECKey ecKey = (com.nimbusds.jose.jwk.ECKey) jsonWebKey;
69-
if (! Curves.BLS12381_G1.equals(ecKey.getCurve())) throw new IllegalArgumentException("Incorrect curve: " + ecKey.getCurve());
61+
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
62+
if (! Curve.BLS12381_G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
7063

71-
return new KeyPair(ecKey.getX().decode(), ecKey.getD().decode());
64+
return new KeyPair(jsonWebKey.getXdecoded(), jsonWebKey.getDdecoded());
7265
}
7366

74-
public static byte[] JWK_to_BLS12381_G1PrivateKeyBytes(JWK jsonWebKey) throws JOSEException {
67+
public static byte[] JWK_to_BLS12381_G1PrivateKeyBytes(JWK jsonWebKey) {
7568

76-
if (! KeyType.EC.equals(jsonWebKey.getKeyType())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKeyType());
69+
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
70+
if (! Curve.BLS12381_G1.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
7771

78-
com.nimbusds.jose.jwk.ECKey ecKey = (com.nimbusds.jose.jwk.ECKey) jsonWebKey;
79-
if (! Curves.BLS12381_G1.equals(ecKey.getCurve())) throw new IllegalArgumentException("Incorrect curve: " + ecKey.getCurve());
80-
81-
return ecKey.getD().decode();
72+
return jsonWebKey.getDdecoded();
8273
}
8374

84-
public static KeyPair JWK_to_BLS12381_G2PrivateKey(JWK jsonWebKey) throws JOSEException {
85-
86-
if (! KeyType.EC.equals(jsonWebKey.getKeyType())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKeyType());
75+
public static KeyPair JWK_to_BLS12381_G2PrivateKey(JWK jsonWebKey) {
8776

88-
com.nimbusds.jose.jwk.ECKey ecKey = (com.nimbusds.jose.jwk.ECKey) jsonWebKey;
89-
if (! Curves.BLS12381_G2.equals(ecKey.getCurve())) throw new IllegalArgumentException("Incorrect curve: " + ecKey.getCurve());
77+
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
78+
if (! Curve.BLS12381_G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
9079

91-
return new KeyPair(ecKey.getX().decode(), ecKey.getD().decode());
80+
return new KeyPair(jsonWebKey.getXdecoded(), jsonWebKey.getDdecoded());
9281
}
9382

94-
public static byte[] JWK_to_BLS12381_G2PrivateKeyBytes(JWK jsonWebKey) throws JOSEException {
83+
public static byte[] JWK_to_BLS12381_G2PrivateKeyBytes(JWK jsonWebKey) {
9584

96-
if (! KeyType.EC.equals(jsonWebKey.getKeyType())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKeyType());
85+
if (! KeyType.EC.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
86+
if (! Curve.BLS12381_G2.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
9787

98-
com.nimbusds.jose.jwk.ECKey ecKey = (com.nimbusds.jose.jwk.ECKey) jsonWebKey;
99-
if (! Curves.BLS12381_G2.equals(ecKey.getCurve())) throw new IllegalArgumentException("Incorrect curve: " + ecKey.getCurve());
100-
101-
return ecKey.getD().decode();
88+
return jsonWebKey.getDdecoded();
10289
}
10390

10491
public static byte[] JWK_to_Ed25519PrivateKeyBytes(JWK jsonWebKey) {
10592

106-
if (! KeyType.OKP.equals(jsonWebKey.getKeyType())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKeyType());
107-
108-
com.nimbusds.jose.jwk.OctetKeyPair octetKeyPair = (com.nimbusds.jose.jwk.OctetKeyPair) jsonWebKey;
109-
if (! Curve.Ed25519.equals(octetKeyPair.getCurve())) throw new IllegalArgumentException("Incorrect curve: " + octetKeyPair.getCurve());
93+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
94+
if (! Curve.Ed25519.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
11095

11196
byte[] privateKeyBytes = new byte[64];
112-
System.arraycopy(octetKeyPair.getD().decode(), 0, privateKeyBytes, 0, 32);
113-
System.arraycopy(octetKeyPair.getX().decode(), 0, privateKeyBytes, 32, 32);
97+
System.arraycopy(jsonWebKey.getDdecoded(), 0, privateKeyBytes, 0, 32);
98+
System.arraycopy(jsonWebKey.getXdecoded(), 0, privateKeyBytes, 32, 32);
11499

115100
return privateKeyBytes;
116101
}
117102

118103
public static byte[] JWK_to_X25519PrivateKeyBytes(JWK jsonWebKey) {
119104

120-
if (! KeyType.OKP.equals(jsonWebKey.getKeyType())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKeyType());
121-
122-
com.nimbusds.jose.jwk.OctetKeyPair octetKeyPair = (com.nimbusds.jose.jwk.OctetKeyPair) jsonWebKey;
123-
if (! Curve.X25519.equals(octetKeyPair.getCurve())) throw new IllegalArgumentException("Incorrect curve: " + octetKeyPair.getCurve());
105+
if (! KeyType.OKP.equals(jsonWebKey.getKty())) throw new IllegalArgumentException("Incorrect key type: " + jsonWebKey.getKty());
106+
if (! Curve.X25519.equals(jsonWebKey.getCrv())) throw new IllegalArgumentException("Incorrect curve: " + jsonWebKey.getCrv());
124107

125108
byte[] privateKeyBytes = new byte[64];
126-
System.arraycopy(octetKeyPair.getD().decode(), 0, privateKeyBytes, 0, 32);
127-
System.arraycopy(octetKeyPair.getX().decode(), 0, privateKeyBytes, 32, 32);
109+
System.arraycopy(jsonWebKey.getDdecoded(), 0, privateKeyBytes, 0, 32);
110+
System.arraycopy(jsonWebKey.getXdecoded(), 0, privateKeyBytes, 32, 32);
128111

129112
return privateKeyBytes;
130113
}

src/main/java/com/danubetech/keyformats/PrivateKey_to_JWK.java

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,125 +4,125 @@
44
import java.security.interfaces.RSAPublicKey;
55
import java.util.Arrays;
66

7-
import com.danubetech.keyformats.jose.Curves;
7+
import bbs.signatures.KeyPair;
8+
import com.danubetech.keyformats.jose.Curve;
9+
import com.danubetech.keyformats.jose.JWK;
10+
import com.danubetech.keyformats.jose.KeyType;
11+
import org.apache.commons.codec.binary.Base64;
812
import org.bitcoinj.core.ECKey;
913
import org.bouncycastle.math.ec.ECPoint;
1014

11-
import com.nimbusds.jose.jwk.Curve;
12-
import com.nimbusds.jose.jwk.KeyUse;
13-
import com.nimbusds.jose.util.Base64URL;
14-
1515
public class PrivateKey_to_JWK {
1616

17-
public static com.nimbusds.jose.jwk.RSAKey RSAPrivateKey_to_JWK(RSAPrivateKey privateKey, RSAPublicKey publicKey, String kid, String use) {
17+
public static JWK RSAPrivateKey_to_JWK(RSAPrivateKey privateKey, RSAPublicKey publicKey, String kid, String use) {
18+
19+
throw new RuntimeException("Not supported");
1820

19-
com.nimbusds.jose.jwk.RSAKey jsonWebKey = new com.nimbusds.jose.jwk.RSAKey.Builder(publicKey)
21+
/* com.nimbusds.jose.jwk.RSAKey jsonWebKey = new com.nimbusds.jose.jwk.RSAKey.Builder(publicKey)
2022
.privateKey(privateKey)
2123
.keyID(kid)
2224
.keyUse(use == null ? null : new KeyUse(use))
2325
.build();
2426
25-
return jsonWebKey;
27+
return jsonWebKey;*/
2628
}
2729

28-
public static com.nimbusds.jose.jwk.ECKey secp256k1PrivateKey_to_JWK(ECKey privateKey, String kid, String use) {
30+
public static JWK secp256k1PrivateKey_to_JWK(ECKey privateKey, String kid, String use) {
2931

3032
ECPoint publicKeyPoint = privateKey.getPubKeyPoint();
3133
byte[] privateKeyBytes = privateKey.getPrivKeyBytes();
32-
Base64URL xParameter = Base64URL.encode(publicKeyPoint.getAffineXCoord().getEncoded());
33-
Base64URL yParameter = Base64URL.encode(publicKeyPoint.getAffineYCoord().getEncoded());
34-
Base64URL dParameter = Base64URL.encode(privateKeyBytes);
3534

36-
com.nimbusds.jose.jwk.ECKey jsonWebKey = new com.nimbusds.jose.jwk.ECKey.Builder(Curve.SECP256K1, xParameter, yParameter)
37-
.d(dParameter)
38-
.keyID(kid)
39-
.keyUse(use == null ? null : new KeyUse(use))
40-
.build();
35+
JWK jsonWebKey = new JWK();
36+
jsonWebKey.setKty(KeyType.EC);
37+
jsonWebKey.setCrv(Curve.secp256k1);
38+
jsonWebKey.setKid(kid);
39+
jsonWebKey.setUse(use);
40+
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyPoint.getAffineXCoord().getEncoded()));
41+
jsonWebKey.setY(Base64.encodeBase64URLSafeString(publicKeyPoint.getAffineYCoord().getEncoded()));
42+
jsonWebKey.setD(Base64.encodeBase64URLSafeString(privateKeyBytes));
4143

4244
return jsonWebKey;
4345
}
4446

45-
public static com.nimbusds.jose.jwk.ECKey secp256k1PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, String kid, String use) {
47+
public static JWK secp256k1PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, String kid, String use) {
4648

4749
ECKey privateKey = ECKey.fromPrivate(privateKeyBytes);
4850

4951
return secp256k1PrivateKey_to_JWK(privateKey, kid, use);
5052
}
5153

52-
public static com.nimbusds.jose.jwk.ECKey BLS12381_G1PrivateKey_to_JWK(ECKey privateKey, String kid, String use) {
54+
public static JWK BLS12381_G1PrivateKey_to_JWK(KeyPair privateKey, String kid, String use) {
5355

54-
ECPoint publicKeyPoint = privateKey.getPubKeyPoint();
55-
byte[] privateKeyBytes = privateKey.getPrivKeyBytes();
56-
Base64URL xParameter = Base64URL.encode(publicKeyPoint.getAffineXCoord().getEncoded());
57-
Base64URL yParameter = Base64URL.encode(publicKeyPoint.getAffineYCoord().getEncoded());
58-
Base64URL dParameter = Base64URL.encode(privateKeyBytes);
56+
byte[] publicKeyBytes = privateKey.publicKey;
57+
byte[] privateKeyBytes = privateKey.secretKey;
5958

60-
com.nimbusds.jose.jwk.ECKey jsonWebKey = new com.nimbusds.jose.jwk.ECKey.Builder(Curves.BLS12381_G1, xParameter, yParameter)
61-
.d(dParameter)
62-
.keyID(kid)
63-
.keyUse(use == null ? null : new KeyUse(use))
64-
.build();
59+
JWK jsonWebKey = new JWK();
60+
jsonWebKey.setKty(KeyType.EC);
61+
jsonWebKey.setCrv(Curve.BLS12381_G1);
62+
jsonWebKey.setKid(kid);
63+
jsonWebKey.setUse(use);
64+
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyBytes));
65+
jsonWebKey.setD(Base64.encodeBase64URLSafeString(privateKeyBytes));
6566

6667
return jsonWebKey;
6768
}
6869

69-
public static com.nimbusds.jose.jwk.ECKey BLS12381_G1PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, String kid, String use) {
70+
public static JWK BLS12381_G1PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
7071

71-
ECKey privateKey = ECKey.fromPrivate(privateKeyBytes);
72+
KeyPair privateKey = new KeyPair(publicKeyBytes, privateKeyBytes);
7273

73-
return secp256k1PrivateKey_to_JWK(privateKey, kid, use);
74+
return BLS12381_G1PrivateKey_to_JWK(privateKey, kid, use);
7475
}
7576

76-
public static com.nimbusds.jose.jwk.ECKey BLS12381_G2PrivateKey_to_JWK(ECKey privateKey, String kid, String use) {
77+
public static JWK BLS12381_G2PrivateKey_to_JWK(KeyPair privateKey, String kid, String use) {
7778

78-
ECPoint publicKeyPoint = privateKey.getPubKeyPoint();
79-
byte[] privateKeyBytes = privateKey.getPrivKeyBytes();
80-
Base64URL xParameter = Base64URL.encode(publicKeyPoint.getAffineXCoord().getEncoded());
81-
Base64URL yParameter = Base64URL.encode(publicKeyPoint.getAffineYCoord().getEncoded());
82-
Base64URL dParameter = Base64URL.encode(privateKeyBytes);
79+
byte[] publicKeyBytes = privateKey.publicKey;
80+
byte[] privateKeyBytes = privateKey.secretKey;
8381

84-
com.nimbusds.jose.jwk.ECKey jsonWebKey = new com.nimbusds.jose.jwk.ECKey.Builder(Curves.BLS12381_G2, xParameter, yParameter)
85-
.d(dParameter)
86-
.keyID(kid)
87-
.keyUse(use == null ? null : new KeyUse(use))
88-
.build();
82+
JWK jsonWebKey = new JWK();
83+
jsonWebKey.setKty(KeyType.EC);
84+
jsonWebKey.setCrv(Curve.BLS12381_G2);
85+
jsonWebKey.setKid(kid);
86+
jsonWebKey.setUse(use);
87+
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyBytes));
88+
jsonWebKey.setD(Base64.encodeBase64URLSafeString(privateKeyBytes));
8989

9090
return jsonWebKey;
9191
}
9292

93-
public static com.nimbusds.jose.jwk.ECKey BLS12381_G2PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, String kid, String use) {
93+
public static JWK BLS12381_G2PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
9494

95-
ECKey privateKey = ECKey.fromPrivate(privateKeyBytes);
95+
KeyPair privateKey = new KeyPair(publicKeyBytes, privateKeyBytes);
9696

97-
return secp256k1PrivateKey_to_JWK(privateKey, kid, use);
97+
return BLS12381_G2PrivateKey_to_JWK(privateKey, kid, use);
9898
}
9999

100-
public static com.nimbusds.jose.jwk.OctetKeyPair Ed25519PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
100+
public static JWK Ed25519PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
101101

102102
byte[] onlyPrivateKeyBytes = Arrays.copyOf(privateKeyBytes, 32);
103-
Base64URL xParameter = Base64URL.encode(publicKeyBytes);
104-
Base64URL dParameter = Base64URL.encode(onlyPrivateKeyBytes);
105103

106-
com.nimbusds.jose.jwk.OctetKeyPair jsonWebKey = new com.nimbusds.jose.jwk.OctetKeyPair.Builder(Curve.Ed25519, xParameter)
107-
.d(dParameter)
108-
.keyID(kid)
109-
.keyUse(use == null ? null : new KeyUse(use))
110-
.build();
104+
JWK jsonWebKey = new JWK();
105+
jsonWebKey.setKty(KeyType.OKP);
106+
jsonWebKey.setCrv(Curve.Ed25519);
107+
jsonWebKey.setKid(kid);
108+
jsonWebKey.setUse(use);
109+
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyBytes));
110+
jsonWebKey.setD(Base64.encodeBase64URLSafeString(onlyPrivateKeyBytes));
111111

112112
return jsonWebKey;
113113
}
114114

115-
public static com.nimbusds.jose.jwk.OctetKeyPair X25519PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
115+
public static JWK X25519PrivateKeyBytes_to_JWK(byte[] privateKeyBytes, byte[] publicKeyBytes, String kid, String use) {
116116

117117
byte[] onlyPrivateKeyBytes = Arrays.copyOf(privateKeyBytes, 32);
118-
Base64URL xParameter = Base64URL.encode(publicKeyBytes);
119-
Base64URL dParameter = Base64URL.encode(onlyPrivateKeyBytes);
120118

121-
com.nimbusds.jose.jwk.OctetKeyPair jsonWebKey = new com.nimbusds.jose.jwk.OctetKeyPair.Builder(Curve.X25519, xParameter)
122-
.d(dParameter)
123-
.keyID(kid)
124-
.keyUse(use == null ? null : new KeyUse(use))
125-
.build();
119+
JWK jsonWebKey = new JWK();
120+
jsonWebKey.setKty(KeyType.OKP);
121+
jsonWebKey.setCrv(Curve.X25519);
122+
jsonWebKey.setKid(kid);
123+
jsonWebKey.setUse(use);
124+
jsonWebKey.setX(Base64.encodeBase64URLSafeString(publicKeyBytes));
125+
jsonWebKey.setD(Base64.encodeBase64URLSafeString(onlyPrivateKeyBytes));
126126

127127
return jsonWebKey;
128128
}

0 commit comments

Comments
 (0)