I need to read private key and public key using RSA algorithm. So how to create .der
file?
Using 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();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.