Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. CertificateFactory cf = CertificateFactory.getInstance("X.509");
  2. InputStream in = new ByteArrayInputStream(myHexCert);
  3. Certificate cert = (X509Certificate) cf.generateCertificate(in);
  4.  
  5. java.security.Signature sig = java.security.Signature.getInstance("1.2.840.113549.1.1.11");
  6. sig.initVerify(cert);
  7. sig.update(myData);
  8. bool verification = sig.verify(mySignedData);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement