}
protected ChangePasswordData decodeChangePasswdData( DERSequence sequence )
{
ChangePasswordDataModifier modifier = new ChangePasswordDataModifier();
for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
{
DERTaggedObject object = ( ( DERTaggedObject ) e.nextElement() );
int tag = object.getTagNo();
DEREncodable derObject = object.getObject();
switch ( tag )
{
case 0:
DEROctetString tag0 = ( DEROctetString ) derObject;
modifier.setNewPassword( tag0.getOctets() );
break;
case 1:
DERSequence tag1 = ( DERSequence ) derObject;
modifier.setTargetName( PrincipalNameDecoder.decode( tag1 ) );
break;
case 2:
DERGeneralString tag2 = ( DERGeneralString ) derObject;
modifier.setTargetRealm( tag2.getString() );
break;
default:
break;
}
}
return modifier.getChangePasswdData();
}