public static OutputStream encrypt(OutputStream unencryptedDataStream,File x509CertificateFile) throws IOException, CertificateException, EncryptionException {
  return new SMIMEEncryptedOutputStream(unencryptedDataStream,x509CertificateFile);
}

public static OutputStream encrypt ( OutputStream unencryptedDataStream , File x509CertificateFile ) throws IOException , CertificateException , EncryptionException { return new SMIMEEncryptedOutputStream ( unencryptedDataStream , x509CertificateFile ) ; }
encrypts the given outputstream using the given x . 509 certificate file .
