Package org.apache.directory.shared.asn1.der

Examples of org.apache.directory.shared.asn1.der.ASN1OutputStream.writeObject()


     */
    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


    {
        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

    {
        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

    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

    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

    {
        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

    {
        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

    {
        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

    {
        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

    public void encode( ErrorMessage message, ByteBuffer out ) throws IOException
    {
        ASN1OutputStream aos = new ASN1OutputStream( out );

        DERSequence errorReply = encodeErrorMessageSequence( message );
        aos.writeObject( DERApplicationSpecific.valueOf( message.getMessageType().getOrdinal(), errorReply ) );

        aos.close();
    }

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.