Package org.bouncycastle2.asn1

Examples of org.bouncycastle2.asn1.ASN1OutputStream.writeObject()


            while (e.hasMoreElements())
            {
                DERObjectIdentifier    oid = (DERObjectIdentifier)e.nextElement();

                aOut.writeObject(oid);
                aOut.writeObject(pkcs12Attributes.get(oid));
            }

            out.writeObject(bOut.toByteArray());
        }
View Full Code Here


            while (e.hasMoreElements())
            {
                DERObjectIdentifier    oid = (DERObjectIdentifier)e.nextElement();

                aOut.writeObject(oid);
                aOut.writeObject(pkcs12Attributes.get(oid));
            }

            out.writeObject(bOut.toByteArray());
        }
    }
View Full Code Here

   
        while (e.hasMoreElements())
        {
            try
            {
                aOut.writeObject(e.nextElement());
   
                pq.add(new PolicyQualifierInfo(bOut.toByteArray()));
            }
            catch (IOException ex)
            {
View Full Code Here

            else
                digest = sig.sign();
            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();

            ASN1OutputStream dout = new ASN1OutputStream(bOut);
            dout.writeObject(new DEROctetString(digest));
            dout.close();

            return bOut.toByteArray();
        }
        catch (Exception e) {
View Full Code Here

            whole.add(new DERTaggedObject(0, new DERSequence(body)));

            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();

            ASN1OutputStream dout = new ASN1OutputStream(bOut);
            dout.writeObject(new DERSequence(whole));
            dout.close();

            return bOut.toByteArray();
        }
        catch (Exception e) {
View Full Code Here

        for(int i=1; i < appWrap.length; i++){
            appWrap[i] = lenBytes[i-1];
        }
       
        asn1Out.write(appWrap);
        asn1Out.writeObject(spnegoOid.toASN1Object());
        asn1Out.writeObject(taggedSpnego.toASN1Object());

        byte[] app = out.toByteArray();
        ASN1InputStream in = new ASN1InputStream(app);
View Full Code Here

            appWrap[i] = lenBytes[i-1];
        }
       
        asn1Out.write(appWrap);
        asn1Out.writeObject(spnegoOid.toASN1Object());
        asn1Out.writeObject(taggedSpnego.toASN1Object());

        byte[] app = out.toByteArray();
        ASN1InputStream in = new ASN1InputStream(app);

        if( LOG.isDebugEnabled() ){
View Full Code Here

            else
                digest = sig.sign();
            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();

            ASN1OutputStream dout = new ASN1OutputStream(bOut);
            dout.writeObject(new DEROctetString(digest));
            dout.close();

            return bOut.toByteArray();
        }
        catch (Exception e) {
View Full Code Here

            whole.add(new DERTaggedObject(0, new DERSequence(body)));

            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();

            ASN1OutputStream dout = new ASN1OutputStream(bOut);
            dout.writeObject(new DERSequence(whole));
            dout.close();

            return bOut.toByteArray();
        }
        catch (Exception e) {
View Full Code Here

  public void setRecipient(GeneralName recipient) {
    this.recipient = recipient;
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ASN1OutputStream aos = new ASN1OutputStream(baos);
    try {
      aos.writeObject(recipient);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    recipientBytes = baos.toByteArray();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.