Examples of ASN1OutputStream


Examples of org.apache.commons.ssl.asn1.ASN1OutputStream

        return true;
    }

    public static byte[] encode(DEREncodable der) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        ASN1OutputStream out = new ASN1OutputStream(baos);
        out.writeObject(der);
        out.close();
        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream

     * @throws IOException
     */
    public static byte[] encode( EncryptionTypeInfo2Entry[] entries ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );
        aos.writeObject( encodeSequence( entries ) );
        aos.close();

        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream


    public byte[] encode( Encodable ticketPart ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        DERSequence ticketSequence = encodeInitialSequence( ( EncTicketPart ) ticketPart );
        aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, ticketSequence ) );
        aos.close();

        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream

     * @throws IOException
     */
    public byte[] encode( Encodable authenticator ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        DERSequence replySequence = encodeInitialSequence( ( Authenticator ) authenticator );
        aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, replySequence ) );
        aos.close();

        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream

     * @throws IOException
     */
    public static byte[] encode( EncryptedData encryptedData ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        aos.writeObject( encodeSequence( encryptedData ) );
        aos.close();

        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream

     * @throws IOException
     */
    public static byte[] encodeTicket( Ticket ticket ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        aos.writeObject( encode( ticket ) );
        aos.close();

        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream

     * @throws IOException
     */
    public byte[] encode( PrivateMessage message ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        DERSequence privateMessageSequence = encodePrivateMessageSequence( message );
        aos
            .writeObject( DERApplicationSpecific
                .valueOf( message.getMessageType().getOrdinal(), privateMessageSequence ) );
        aos.close();

        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream


    public byte[] encode( Encodable apRepPart ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        DERSequence privPartSequence = encodeApRepPartSequence( ( EncApRepPart ) apRepPart );
        aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, privPartSequence ) );
        aos.close();

        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream


    public byte[] encode( Encodable app ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        DERSequence initialSequence = encodeInitialSequence( ( KdcReply ) app );
        aos.writeObject( DERApplicationSpecific.valueOf( applicationCode, initialSequence ) );

        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream

     * @throws IOException
     */
    public byte[] encode( ApplicationReply reply ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        DERSequence replySequence = encodeReplySequence( reply );
        aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, replySequence ) );
        aos.close();

        return 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.