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

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


     * @param out
     * @throws IOException
     */
    public void encode( KdcReply app, ByteBuffer out ) throws IOException
    {
        ASN1OutputStream aos = new ASN1OutputStream( out );

        DERSequence kdcrep = encodeKdcReplySequence( app );
        aos.writeObject( DERApplicationSpecific.valueOf( app.getMessageType().getOrdinal(), kdcrep ) );

        aos.close();
    }
View Full Code Here


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

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

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

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

        DERSequence requestSequence = encodeReplySequence( request );
        aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, requestSequence ) );
        aos.close();

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

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

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

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

public class EncryptedTimestampEncoder implements Encoder, EncoderFactory
{
    public byte[] encode( Encodable encryptedTimestamp ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        aos.writeObject( encodeTimestamp( ( EncryptedTimeStamp ) encryptedTimestamp ) );
        aos.close();

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

     * @param out
     * @throws IOException
     */
    public void encode( KdcRequest request, ByteBuffer out ) throws IOException
    {
        ASN1OutputStream aos = new ASN1OutputStream( out );

        DERSequence kdcRequest = encodeInitialSequence( request );
        aos.writeObject( DERApplicationSpecific.valueOf( request.getMessageType().getOrdinal(), kdcRequest ) );
        aos.close();
    }
View Full Code Here

     * @throws IOException
     */
    public byte[] encodeRequestBody( RequestBody requestBody ) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ASN1OutputStream aos = new ASN1OutputStream( baos );

        aos.writeObject( encodeKdcRequestBody( requestBody ) );
        aos.close();

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

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

        DERSequence dataSequence = encodeDataSequence( data );
        aos.writeObject( dataSequence );

        aos.close();

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

     * @param out
     * @throws IOException
     */
    public void encode( ChangePasswordData data, ByteBuffer out ) throws IOException
    {
        ASN1OutputStream aos = new ASN1OutputStream( out );

        DERSequence sequence = encodeDataSequence( data );
        aos.writeObject( sequence );

        aos.close();
    }
View Full Code Here

     */
    public ExtendedResponse extended( String oid, byte[] value ) throws LdapException
    {
        try
        {
            return extended( new Oid( oid ), value );
        }
        catch ( DecoderException e )
        {
            String msg = "Failed to decode the OID " + oid;
            LOG.error( msg );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.asn1.der.ASN1OutputStream

Copyright © 2018 www.massapicom. 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.