Package org.bouncycastle2.asn1

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


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


                ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
                ASN1OutputStream        dOut = new ASN1OutputStream(bOut);

                try
                {
                    dOut.writeObject(new DEROctetString(engineGetEncoded("RAW")));
                }
                catch (IOException e)
                {
                    return null;
                }
View Full Code Here

                ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
                ASN1OutputStream        dOut = new ASN1OutputStream(bOut);

                try
                {
                    dOut.writeObject(new IDEACBCPar(engineGetEncoded("RAW")));
                }
                catch (IOException e)
                {
                    return null;
                }
View Full Code Here

                try
                {
                    if (parameterVersion == -1)
                    {
                        dOut.writeObject(new RC2CBCParameter(engineGetEncoded()));
                    }
                    else
                    {
                        dOut.writeObject(new RC2CBCParameter(parameterVersion, engineGetEncoded()));
                    }
View Full Code Here

                    {
                        dOut.writeObject(new RC2CBCParameter(engineGetEncoded()));
                    }
                    else
                    {
                        dOut.writeObject(new RC2CBCParameter(parameterVersion, engineGetEncoded()));
                    }
                }
                catch (IOException e)
                {
                    return null;
View Full Code Here

                ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
                ASN1OutputStream        dOut = new ASN1OutputStream(bOut);

                try
                {
                    dOut.writeObject(new CAST5CBCParameters(engineGetEncoded(), keyLength));
                }
                catch (IOException e)
                {
                    return null;
                }
View Full Code Here

            while (e.hasMoreElements())
            {
                try
                {
                    aOut.writeObject(e.nextElement());

                    certs.add(cf.generateCertificate(
                        new ByteArrayInputStream(bOut.toByteArray())));
                }
                catch (IOException ex)
View Full Code Here

            signature.initVerify(key);

            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
            ASN1OutputStream        aOut = new ASN1OutputStream(bOut);

            aOut.writeObject(req.getTbsRequest());

            signature.update(bOut.toByteArray());

            return signature.verify(this.getSignature());
        }
View Full Code Here

        throws IOException
    {
        ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
        ASN1OutputStream        aOut = new ASN1OutputStream(bOut);

        aOut.writeObject(req);

        return bOut.toByteArray();
    }

    /**
 
View Full Code Here

                                                            aIn.readObject());

            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
            ASN1OutputStream        aOut = new ASN1OutputStream(bOut);

            aOut.writeObject(info.getPublicKey());

            digest.update(bOut.toByteArray());

            ASN1OctetString issuerKeyHash = new DEROctetString(digest.digest());
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.