| * Test the decoding of a full ETYPE-INFO2-ENTRY
*/
@Test
public void testDecodeETypeInfoEntry()
{
Asn1Decoder krbDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x17 );
stream.put( new byte[]
{
0x30, 0x15,
( byte ) 0xA0, 0x03, // etype
0x02,
0x01,
0x05,
( byte ) 0xA1,
0x06, // salt
0x1B,
0x04,
'a',
'b',
'c',
'd',
( byte ) 0xA2,
0x06, // s2kparams
0x04,
0x04,
0x31,
0x32,
0x33,
0x34
} );
String decodedPdu = Strings.dumpBytes( stream.array() );
stream.flip();
ETypeInfo2EntryContainer container = new ETypeInfo2EntryContainer();
try
{
krbDecoder.decode( stream, container );
}
catch ( DecoderException de )
{
de.printStackTrace();
|