private void VerifyEncodedData(
            MemoryStream bOut)
        {
            CmsSignedDataParser sp = new CmsSignedDataParser(bOut.ToArray());

            sp.GetSignedContent().Drain();

            VerifySignatures(sp);

            sp.Close();
        }
        private void CheckSigParseable(byte[] sig)
        {
            CmsSignedDataParser sp = new CmsSignedDataParser(sig);

            sp.Version.ToString();
            CmsTypedStream sc = sp.GetSignedContent();

            if (sc != null)
            {
                sc.Drain();
            }
            sp.GetAttributeCertificates("Collection");
            sp.GetCertificates("Collection");
            sp.GetCrls("Collection");
            sp.GetSignerInfos();
            sp.Close();
        }