Exemplo n.º 1
0
        private void lengthTest(string type, IList headers, byte[] data)
        {
            StringWriter sw = new StringWriter();
            PemWriter pWrt = new PemWriter(sw);

            PemObject pemObj = new PemObject(type, headers, data);
            pWrt.WriteObject(pemObj);
            pWrt.Writer.Close();

            Assert.AreEqual(sw.ToString().Length, pWrt.GetOutputSize(pemObj));
        }
Exemplo n.º 2
0
        private void lengthTest(string type, IList headers, byte[] data)
        {
            StringWriter sw   = new StringWriter();
            PemWriter    pWrt = new PemWriter(sw);

            PemObject pemObj = new PemObject(type, headers, data);

            pWrt.WriteObject(pemObj);
            pWrt.Writer.Close();

            Assert.AreEqual(sw.ToString().Length, pWrt.GetOutputSize(pemObj));
        }