Examples of encode()


Examples of org.apache.directory.shared.kerberos.components.KdcReq.encode()

        // Check the encoding
        ByteBuffer encodedPdu = ByteBuffer.allocate( length );

        try
        {
            encodedPdu = kdcReq.encode( encodedPdu );

            // Check the length
            assertEquals( 0x193, encodedPdu.limit() );
        }
        catch ( EncoderException ee )

Examples of org.apache.directory.shared.kerberos.components.KdcReqBody.encode()

        // Check the encoding
        ByteBuffer encodedPdu = ByteBuffer.allocate( length );

        try
        {
            encodedPdu = body.encode( encodedPdu );

            // Check the length
            assertEquals( 0x15B, encodedPdu.limit() );
        }
        catch ( EncoderException ee )

Examples of org.apache.directory.shared.kerberos.components.KrbCredInfo.encode()

                f = krbCredInfoFieldNameMap.get( Strings.toLowerCase( fieldValHolder.fieldName ) );
                f.set( expected, fieldValHolder.value );
            }

            ByteBuffer stream = ByteBuffer.allocate( expected.computeLength() );
            expected.encode( stream );
            stream.flip();

            Asn1Decoder decoder = new Asn1Decoder();
            KrbCredInfoContainer container = new KrbCredInfoContainer();
            container.setStream( stream );

Examples of org.apache.directory.shared.kerberos.components.KrbSafeBody.encode()

        try
        {
            ByteBuffer bb = ByteBuffer.allocate( computedLen );

            body.encode( bb );

            String encoded = Strings.dumpBytes( bb.array() );
            assertEquals( decoded, encoded );
        }
        catch ( EncoderException e )

Examples of org.apache.directory.shared.kerberos.components.LastReq.encode()

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( lastReq.computeLength() );

        try
        {
            bb = lastReq.encode( bb );

            // Check the length
            assertEquals( 0x36, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.MethodData.encode()

        methodData.addPaData( new PaData( PaDataType.PA_ENCTYPE_INFO2, encTypeInfo2 ) );

        try
        {
            ByteBuffer buffer = ByteBuffer.allocate( methodData.computeLength() );
            return methodData.encode( buffer ).array();
        }
        catch ( EncoderException ee )
        {
            LOG_KRB.warn( "Failed to encode the etype information", ee );
            return null;

Examples of org.apache.directory.shared.kerberos.components.PaData.encode()

        ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() );

        try
        {
            bb = checksum.encode( bb );

            // Check the length
            assertEquals( 0x11, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.PaEncTimestamp.encode()

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( paEncTimestamp.computeLength() );

        try
        {
            bb = paEncTimestamp.encode( bb );

            // Check the length
            assertEquals( 0x16, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.PaEncTsEnc.encode()

        ByteBuffer bb = ByteBuffer.allocate( paEncTsEnc.computeLength() );

        try
        {
            bb = paEncTsEnc.encode( bb );

            // Check the length
            assertEquals( 0x1A, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );

Examples of org.apache.directory.shared.kerberos.components.PrincipalName.encode()

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( principalName.computeLength() );

        try
        {
            bb = principalName.encode( bb );

            // Check the length
            assertEquals( 0x29, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );
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.