Package org.bouncycastle.sasn1

Examples of org.bouncycastle.sasn1.BerOctetStringGenerator$BufferedBerOctetStream


       
        eP.getRecipientInfos();
       
        EncryptedContentInfoParser ecP = eP.getEncryptedContentInfo();
       
        Asn1OctetString content = (Asn1OctetString)ecP.getEncryptedContent(BerTag.OCTET_STRING);
       
        InputStream in = content.getOctetStream();
       
        while (in.read() >= 0)
        {
            // do nothing
        }
View Full Code Here


        ContentInfoParser cp = new ContentInfoParser((Asn1Sequence)aIn.readObject());
       
        CompressedDataParser  comData = new CompressedDataParser((Asn1Sequence)cp.getContent(BerTag.SEQUENCE));
        ContentInfoParser     content = comData.getEncapContentInfo();

        Asn1OctetString bytes = (Asn1OctetString)content.getContent(BerTag.OCTET_STRING);

        InputStream in = bytes.getOctetStream();
        int         count = 0;
       
        while (in.read() >= 0)
        {
            count++;
View Full Code Here

    public void testDerReading()
        throws Exception
    {
        Asn1InputStream aIn = new Asn1InputStream(seqData);
       
        Asn1Sequence    seq = (Asn1Sequence)aIn.readObject();
        Object          o = null;
        int             count = 0;
       
        assertNotNull("null sequence returned", seq);
       
        while ((o = seq.readObject()) != null)
        {
            switch (count)
            {
            case 0:
                assertTrue(o instanceof Asn1Integer);
View Full Code Here

        byte[] data)
        throws Exception
    {
        Asn1InputStream aIn = new Asn1InputStream(data);
       
        Asn1Sequence    seq = (Asn1Sequence)aIn.readObject();
        Object          o = null;
        int             count = 0;
       
        assertNotNull("null sequence returned", seq);
       
        while ((o = seq.readObject()) != null)
        {
            switch (count)
            {
            case 0:
                assertTrue(o instanceof Asn1Integer);
                break;
            case 1:
                assertTrue(o instanceof Asn1ObjectIdentifier);
                break;
            case 2:
                assertTrue(o instanceof Asn1Sequence);
               
                Asn1Sequence s = (Asn1Sequence)o;
               
                s.readObject();
               
                break;
            }
            count++;
        }
View Full Code Here

    public void testBerReading()
        throws Exception
    {
        Asn1InputStream aIn = new Asn1InputStream(berSeqData);
       
        Asn1Sequence    seq = (Asn1Sequence)aIn.readObject();
        Object          o = null;
        int             count = 0;
       
        assertNotNull("null sequence returned", seq);
       
        while ((o = seq.readObject()) != null)
        {
            switch (count)
            {
            case 0:
                assertTrue(o instanceof Asn1Integer);
View Full Code Here

        _certsCalled = true;
        _nextObject = _seq.readObject();

        if (_nextObject instanceof Asn1TaggedObject && ((Asn1TaggedObject)_nextObject).getTagNumber() == 0)
        {
            Asn1Set certs = (Asn1Set)((Asn1TaggedObject)_nextObject).getObject(BerTag.SET, false);
            _nextObject = null;
           
            return certs;
        }
       
View Full Code Here

            _nextObject = _seq.readObject();
        }
       
        if (_nextObject instanceof Asn1TaggedObject && ((Asn1TaggedObject)_nextObject).getTagNumber() == 1)
        {
            Asn1Set crls = (Asn1Set)((Asn1TaggedObject)_nextObject).getObject(BerTag.SET, false);
            _nextObject = null;
           
            return crls;
        }
       
View Full Code Here

    {
        _nextObject = _seq.readObject();

        if (_nextObject instanceof Asn1TaggedObject && ((Asn1TaggedObject)_nextObject).getTagNumber() == 0)
        {
            Asn1Set certs = (Asn1Set)((Asn1TaggedObject)_nextObject).getObject(BerTag.SET, false);
            _nextObject = null;
           
            return certs;
        }
       
View Full Code Here

            _nextObject = _seq.readObject();
        }
       
        if (_nextObject instanceof Asn1TaggedObject && ((Asn1TaggedObject)_nextObject).getTagNumber() == 1)
        {
            Asn1Set crls = (Asn1Set)((Asn1TaggedObject)_nextObject).getObject(BerTag.SET, false);
            _nextObject = null;
           
            return crls;
        }
       
View Full Code Here

    public void testLongTag()
        throws IOException
    {
        Asn1InputStream aIn = new Asn1InputStream(longTagged);
       
        Asn1TaggedObject tagged = (Asn1TaggedObject)aIn.readObject();
       
        assertEquals(31, tagged.getTagNumber());
    }
View Full Code Here

TOP

Related Classes of org.bouncycastle.sasn1.BerOctetStringGenerator$BufferedBerOctetStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.