Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.bouncycastle.jce.spec.ECNamedCurveParameterSpec;
import org.bouncycastle.jce.spec.ECParameterSpec;
import org.bouncycastle.jce.spec.ECPrivateKeySpec;
import org.bouncycastle.util.encoders.Base64Encoder;
import org.jose4j.jwk.EcJwkGenerator;
import org.jose4j.jwk.EllipticCurveJsonWebKey;
import org.jose4j.jws.AlgorithmIdentifiers;
Expand Down Expand Up @@ -199,9 +198,6 @@ private PrivateKey readEcPrivateKey(String fileName) throws InvalidKeySpecExcept
try {
@SuppressWarnings({ "unchecked", "rawtypes" })
EllipticCurveJsonWebKey jwk = new EllipticCurveJsonWebKey((Map<String, Object>)(Map)son);
Base64Encoder enc = new Base64Encoder();
ByteArrayOutputStream os = new ByteArrayOutputStream();
enc.encode(jwk.getPrivateKey().getEncoded(), 0, jwk.getPrivateKey().getEncoded().length, os);
return jwk.getPrivateKey();
} catch (JoseException e1) {
e1.printStackTrace();
Expand Down