private static void savePrivateKeyPKCS8 ( OutputStream os , PrivateKey key ) throws IllegalArgumentException , IOException { CertificateUtils . savePrivateKey ( os , key , Encoding . PEM , null , null ) ; }
Serializes a private key to an output stream following the pkcs8 encoding .