Package org.apache.geronimo.util.asn1

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


                   
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   
                DEROutputStream k = new DEROutputStream(baos);
                   
                k.writeObject(obj);
                   
                recipientsField[i] = baos.toByteArray();
                   
                i++;
            }
View Full Code Here


        Pfx pfx = Pfx.getInstance(berPKCS12File);

        bOut.reset();

        dOut.writeObject(pfx);

        return bOut.toByteArray();
    }

    /**
 
View Full Code Here

        DEROutputStream dOut = new DEROutputStream(bOut);

        ASN1InputStream contentIn = new ASN1InputStream(content.getOctets());
        ASN1Primitive obj = contentIn.readObject();

        dOut.writeObject(obj);

        info = new ContentInfo(info.getContentType(), new DEROctetString(bOut.toByteArray()));

        MacData mData = pfx.getMacData();
        try
View Full Code Here

       
        pfx = new Pfx(info, mData);

        bOut.reset();
       
        dOut.writeObject(pfx);
       
        return bOut.toByteArray();
    }

    private static byte[] calculatePbeMac(
View Full Code Here

        else
        {
            asn1Out = new BEROutputStream(bOut);
        }

        asn1Out.writeObject(auth);

        byte[] pkg = bOut.toByteArray();

        ContentInfo mainInfo = new ContentInfo(data, new BEROctetString(pkg));
View Full Code Here

        else
        {
            asn1Out = new BEROutputStream(stream);
        }

        asn1Out.writeObject(pfx);
    }

    private static byte[] calculatePbeMac(
        ASN1ObjectIdentifier oid,
        byte[] salt,
View Full Code Here

                ByteArrayOutputStream baos = new ByteArrayOutputStream();

                DEROutputStream k = new DEROutputStream(baos);

                k.writeObject(obj);

                recipientsField[i] = baos.toByteArray();

                i++;
            }
View Full Code Here

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

            try
            {
                dOut.writeObject(params);
            }
            catch (IOException e)
            {
                throw new RuntimeException("Oooops! " + e.toString());
            }
View Full Code Here

            DEROutputStream         dOut = new DEROutputStream(bOut);
            DHParameter             dhP = new DHParameter(currentSpec.getP(), currentSpec.getG(), currentSpec.getL());

            try
            {
                dOut.writeObject(dhP);
                dOut.close();
            }
            catch (IOException e)
            {
                throw new RuntimeException("Error encoding DHParameters");
View Full Code Here

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

        try
        {
            dOut.writeObject(c.getTBSCertificate());

            return bOut.toByteArray();
        }
        catch (IOException e)
        {
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.