Guest User

Untitled

a guest
Jun 24th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. CertificateFactory fact = CertificateFactory.getInstance("X.509");
  2. File f = new File("cert.pem");
  3. FileInputStream fis = new FileInputStream (f);
  4. X509Certificate cer = (X509Certificate) fact.generateCertificate(fis);
  5. PublicKey key = cer.getPublicKey();
  6.  
  7. String token = encrypt(content, key);
Add Comment
Please, Sign In to add comment