[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [iaik-ssl] JCE Applet Edition - private key format



It worked a treat....thanks for you help....
 
Regards
 
Dave
-----Original Message-----
From: Dieter Bratko [mailto:Dieter.Bratko@iaik.at]
Sent: 08 September 1999 15:00
To: Dave Streeter - IICL Email; 'iaik-jce@iaik.tu-graz.ac.at'
Subject: Re: [iaik-ssl] JCE Applet Edition - private key format

Try the EncryptedPrivateKeyInfo(InputStream is) constructor of iaik.pkcs.pkcs8.EncryptedPrivateKeyInfo:
 
      InputStream is = ...;
       EncryptedPrivateKeyInfo epki = new EncryptedPrivateKeyInfo(is);
      epki.decrypt("...".toCharArray());
      PrivateKey privKey = epki.getPrivateKeyInfo();   
This constructor recognizes the PEM encoding and will parse the EncryptedPriavteKeyInfo (presuming PKCS#8 Format).
 
Dieter Bratko
 
----- Original Message -----
From: Dave Streeter - IICL Email
To: 'iaik-jce@iaik.tu-graz.ac.at'
Sent: Wednesday, September 08, 1999 12:13 PM
Subject: [iaik-ssl] JCE Applet Edition - private key format

Does anybody know of a way of instantiating a private key from the following format String ?
 
-----BEGIN ENCRYPTED PRIVATE KEY-----
....
.... data removed for security reasons
....
-----END ENCRYPTED PRIVATE KEY-----

Thanks in advance

Dave Streeter