Package org.apache.geronimo.util.asn1

Examples of org.apache.geronimo.util.asn1.ASN1OutputStream.writeObject()


            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

  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

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.