Esempio n. 1
0
            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;
            }
Esempio n. 2
0
            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;
            }