Exemple #1
0
// ---------------------------------------------------------------------------
    public void Write(Stream stream) {
      using (ZipFile zip = new ZipFile()) {
        EncryptionPdf metadata = new EncryptionPdf();
        byte[] enc1 = metadata.CreatePdf();        
        zip.AddEntry(RESULT1,enc1);
        byte[] enc2 = metadata.DecryptPdf(enc1);
        zip.AddEntry(RESULT2, enc2);
        zip.AddEntry(RESULT3, metadata.EncryptPdf(enc2));
        zip.Save(stream);
      }    
    }
Exemple #2
0
// ---------------------------------------------------------------------------
        public void Write(Stream stream)
        {
            using (ZipFile zip = new ZipFile()) {
                EncryptionPdf metadata = new EncryptionPdf();
                byte[]        enc1     = metadata.CreatePdf();
                zip.AddEntry(RESULT1, enc1);
                byte[] enc2 = metadata.DecryptPdf(enc1);
                zip.AddEntry(RESULT2, enc2);
                zip.AddEntry(RESULT3, metadata.EncryptPdf(enc2));
                zip.Save(stream);
            }
        }