We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
是否没有提供将PrivateKey保存的.pem的方法?
目前通过如下方法将PrivateKey保存为.pem
public void savePrivateKey(OutputStream outputStream, BigInteger privateKey) throws Exception{ ECNamedCurveParameterSpec ecNamedCurveParameterSpec = ECNamedCurveTable.getParameterSpec("secp256k1"); ECPrivateKeySpec ecPrivateKeySpec = new ECPrivateKeySpec(privateKey,ecNamedCurveParameterSpec); KeyFactory keyFactory = KeyFactory.getInstance("ECDSA"); keyFactory.generatePrivate(ecPrivateKeySpec).getEncoded(); outputStream.write( ("-----BEGIN PRIVATE KEY-----\n" + Base64.encodeBase64String(keyFactory.generatePrivate(ecPrivateKeySpec).getEncoded()) + "\n-----END PRIVATE KEY-----\n").getBytes() ); outputStream.close(); }
是否有其他内置方法可供调用?
The text was updated successfully, but these errors were encountered:
morebtcg
ywy2090
fqliao
No branches or pull requests
是否没有提供将PrivateKey保存的.pem的方法?
目前通过如下方法将PrivateKey保存为.pem
是否有其他内置方法可供调用?
The text was updated successfully, but these errors were encountered: