Package iaik.pkcs.pkcs8

Examples of iaik.pkcs.pkcs8.EncryptedPrivateKeyInfo.encrypt()


      /* encrypt the key and save the cert */

      EncryptedPrivateKeyInfo epki = new EncryptedPrivateKeyInfo(
        (PrivateKeyInfo)kp.getPrivate());
      epki.encrypt(getPassword("Certificate password"),
        AlgorithmID.pbeWithMD5AndDES_CBC, null);
      new KeyAndCertificate(epki, chain).saveTo(args[0], ASN1.PEM);
  } catch (Exception e) {
      System.out.println("OOPS: " + e);
      e.printStackTrace();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.