Examples of ETypeInfo2EntryContainer


Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

        }

        // Now, let's decode the ETYPE-INFO2-ENTRY
        Asn1Decoder etypeInfo2EntryDecoder = new Asn1Decoder();

        ETypeInfo2EntryContainer etypeInfo2EntryContainer = new ETypeInfo2EntryContainer();
        etypeInfo2EntryContainer.setStream( eTypeInfo2Container.getStream() );

        // Compute the start position in the stream for the ETypeInfoEntry to decode :
        // We have to move back to the ETypeInfoEntry tag
        eTypeInfo2Container.rewind();

        // Decode the ETypeInfo2Entry PDU
        try
        {
            etypeInfo2EntryDecoder.decode( eTypeInfo2Container.getStream(), etypeInfo2EntryContainer );
        }
        catch ( DecoderException de )
        {
            throw de;
        }

        // Update the expected length for the current TLV
        tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );

        // Update the parent
        eTypeInfo2Container.updateParent();

        // Store the ETypeInfoEntry in the container
        ETypeInfo2Entry etypeInfo2Entry = etypeInfo2EntryContainer.getETypeInfo2Entry();
        eTypeInfo2Container.addEtypeInfo2Entry( etypeInfo2Entry );


        if ( IS_DEBUG )
        {
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

            } );
       
        String decodedPdu = Strings.dumpBytes(stream.array());
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();
           
            fail( de.getMessage() );
        }

        ETypeInfo2Entry etypeInfo2Entry = container.getETypeInfo2Entry();
       
        assertEquals( EncryptionType.DES3_CBC_MD5, etypeInfo2Entry.getEType() );
        assertEquals( "abcd", etypeInfo2Entry.getSalt() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8("1234"), etypeInfo2Entry.getS2kparams() ) );
       
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

            } );
       
        String decodedPdu = Strings.dumpBytes(stream.array());
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();
           
            fail( de.getMessage() );
        }

        ETypeInfo2Entry etypeInfo2Entry = container.getETypeInfo2Entry();
       
        assertEquals( EncryptionType.DES3_CBC_MD5, etypeInfo2Entry.getEType() );
        assertNull( etypeInfo2Entry.getSalt() );
        assertNull( etypeInfo2Entry.getS2kparams() );
       
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

                  (byte)0xA1, 0x00                  // salt
            } );
       
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

                    0x1B, 0x00
            } );
       
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();
           
            fail( de.getMessage() );
        }

        ETypeInfo2Entry etypeInfo2Entry = container.getETypeInfo2Entry();
       
        assertEquals( EncryptionType.DES3_CBC_MD5, etypeInfo2Entry.getEType() );
        assertNull( etypeInfo2Entry.getSalt() );
        assertNull( etypeInfo2Entry.getS2kparams() );
       
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

                0x30, 0x00
            } );
       
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

                    0x04, 0x00
            } );
       
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

                  (byte)0xA0, 0x00
            } );
       
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

                    0x02, 0x00
            } );
       
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer

                    0x02, 0x01, 0x40
            } );
       
        stream.flip();

        ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
       
        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();
           
            fail( de.getMessage() );
        }

        ETypeInfo2Entry etypeInfo2Entry = container.getETypeInfo2Entry();
       
        assertEquals( EncryptionType.UNKNOWN, etypeInfo2Entry.getEType() );
        assertNull( etypeInfo2Entry.getSalt() );
        assertNull( etypeInfo2Entry.getS2kparams() );
       
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.