* @param sequence
* @return The {@link EncApRepPart}.
*/
private EncApRepPart decodeEncApRepPartSequence( DERSequence sequence )
{
EncApRepPartModifier modifier = new EncApRepPartModifier();
for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
{
DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
int tag = object.getTagNo();
DEREncodable derObject = object.getObject();
switch ( tag )
{
case 0:
DERGeneralizedTime tag0 = ( DERGeneralizedTime ) derObject;
modifier.setClientTime( KerberosTimeDecoder.decode( tag0 ) );
break;
case 1:
DERInteger tag1 = ( DERInteger ) derObject;
modifier.setClientMicroSecond( new Integer( tag1.intValue() ) );
break;
case 2:
DERSequence tag2 = ( DERSequence ) derObject;
modifier.setSubSessionKey( EncryptionKeyDecoder.decode( tag2 ) );
break;
case 3:
DERInteger tag3 = ( DERInteger ) derObject;
modifier.setSequenceNumber( new Integer( tag3.intValue() ) );
break;
}
}
return modifier.getEncApRepPart();
}