我需要使用RSA算法读取私钥和公钥。那么如何创建.der
文件?
答案 0 :(得分:0)
使用CertificateFactory
try{
CertificateFactory cf = CertificateFactory.getInstance("X.509");
Certificate cert = cf.generateCertificate(new FileInputStream("ca.cert"));
System.out.println(cert);
}catch(Exception ex){
ex.printStackTrace();
}