internal ByteStore(PdfDictionary dict, IntHashtable serialized) { try { md5 = Org.BouncyCastle.Security.DigestUtilities.GetDigest("MD5"); } catch (Exception e) { throw new PdfException(e); } ByteBufferOutputStream bb = new ByteBufferOutputStream(); int level = 100; SerObject(dict, level, bb, serialized); this.b = bb.ToByteArray(); hash = CalculateHash(this.b); md5 = null; }
internal SerializedPdfObject(PdfObject obj, Dictionary <int, byte[]> objToSerializedContent) { System.Diagnostics.Debug.Assert(obj.IsDictionary() || obj.IsStream()); this.objToSerializedContent = objToSerializedContent; try { md5 = Org.BouncyCastle.Security.DigestUtilities.GetDigest("MD5"); } catch (Exception e) { throw new PdfException(e); } ByteBufferOutputStream bb = new ByteBufferOutputStream(); int level = 100; SerObject(obj, level, bb); this.serializedContent = bb.ToByteArray(); hash = CalculateHash(this.serializedContent); md5 = null; }