@@ -110,9 +110,8 @@ public ECParameterSpec getParams() {
110
110
}
111
111
112
112
public String toString () {
113
- StringBuffer sb = new StringBuffer ();
114
- sb .append (algorithm ).append ("PublicKey [size=" ).append (keyLength )
115
- .append ("]\n ECPoint: " ).append (getW ())
113
+ StringBuffer sb = new StringBuffer (super .toString ());
114
+ sb .append ("\n ECPoint: " ).append (getW ())
116
115
.append ("\n params: " ).append (getParams ());
117
116
return sb .toString ();
118
117
}
@@ -129,16 +128,8 @@ public static class CRSAPublicKey extends CPublicKey implements RSAPublicKey {
129
128
}
130
129
131
130
public String toString () {
132
- StringBuffer sb = new StringBuffer ();
133
- sb .append (algorithm ).append ("PublicKey [size=" ).append (keyLength )
134
- .append (" bits, type=" );
135
- if (handles .hCryptKey != 0 ) {
136
- sb .append (getKeyType (handles .hCryptKey ))
137
- .append (", container=" ).append (getContainerName (handles .hCryptProv ));
138
- } else {
139
- sb .append ("CNG" );
140
- }
141
- sb .append ("]\n modulus: " ).append (getModulus ())
131
+ StringBuffer sb = new StringBuffer (super .toString ());
132
+ sb .append ("\n modulus: " ).append (getModulus ())
142
133
.append ("\n public exponent: " ).append (getPublicExponent ());
143
134
return sb .toString ();
144
135
}
@@ -209,7 +200,7 @@ public static CPublicKey of(
209
200
210
201
protected CPublicKey (
211
202
String alg , NativeHandles handles , int keyLength ) {
212
- super (alg , handles , keyLength );
203
+ super (alg , handles , keyLength , true );
213
204
}
214
205
215
206
@ Override
0 commit comments