Ejemplo n.º 1
0
 public virtual byte[] DecryptByteArray(byte[] b)
 {
     try {
         MemoryStream ba  = new MemoryStream();
         IDecryptor   dec = securityHandler.GetDecryptor();
         byte[]       b2  = dec.Update(b, 0, b.Length);
         if (b2 != null)
         {
             ba.Write(b2);
         }
         b2 = dec.Finish();
         if (b2 != null)
         {
             ba.Write(b2);
         }
         return(ba.ToArray());
     }
     catch (System.IO.IOException e) {
         throw new PdfException(PdfException.PdfEncryption, e);
     }
 }