ds.ov2.test
Class Exponent_perf_stubs

java.lang.Object
  extended by ds.ov2.test.Exponent_perf_stubs

public class Exponent_perf_stubs
extends Object

Stub code for running methods on the card. Defines one stub method for each protocol step in Exponent_perf.id. The stub methods are the top entry point into the OV-chip protocol layer for host driver code. Each stub method performs the following actions:

  1. argument conversion (for instance from BigInteger to Bignat)
  2. transfers the arguments to the card (possibly using several APDU's)
  3. invokes the right method on the card
  4. transfers the results back (again with possibly several APDU's)
  5. result conversion
  6. and finally packages several results into one tuple object

CPP Preprocessing
no cpp preprocessing needed
Execution Environment:
host
Author:
idl compiler
Version:
automatically generated from Exponent_perf.id

Field Summary
private  Host_protocol hp_set_vector_length
          Host protocol instance for step set_vector_length of protocol Vector_length.
private  Host_protocol hp_vector_exp_1
          Host protocol instance for step vector_exp_1 of protocol Vector_exp.
private  Host_protocol hp_vector_exp_2
          Host protocol instance for step vector_exp_2 of protocol Vector_exp.
private  Host_protocol hp_vector_exp_choose_mod
          Host protocol instance for step vector_exp_choose_mod of protocol Vector_exp.
private  Host_protocol hp_vector_exp_init
          Host protocol instance for step vector_exp_init of protocol Vector_exp.
private  Host_protocol hp_vector_exp_result
          Host protocol instance for step vector_exp_result of protocol Vector_exp.
private  PrintWriter out
          The output channel for debugging information of the OV-chip protocol layer.
private  Exponent_perf_description protocol_description
          A protocol description instance from Exponent_perf.id.
private  boolean with_apdu_script
          Controls apdutool line printing.
 
Constructor Summary
Exponent_perf_stubs(Exponent_perf_description d, PrintWriter o, boolean script)
          Stub constructor.
 
Method Summary
private  void init_hp_set_vector_length(Exponent_perf_description d, PrintWriter out, boolean script)
          Initialization method for hp_set_vector_length.
private  void init_hp_vector_exp_1(Exponent_perf_description d, PrintWriter out, boolean script)
          Initialization method for hp_vector_exp_1.
private  void init_hp_vector_exp_2(Exponent_perf_description d, PrintWriter out, boolean script)
          Initialization method for hp_vector_exp_2.
private  void init_hp_vector_exp_choose_mod(Exponent_perf_description d, PrintWriter out, boolean script)
          Initialization method for hp_vector_exp_choose_mod.
private  void init_hp_vector_exp_init(Exponent_perf_description d, PrintWriter out, boolean script)
          Initialization method for hp_vector_exp_init.
private  void init_hp_vector_exp_result(Exponent_perf_description d, PrintWriter out, boolean script)
          Initialization method for hp_vector_exp_result.
 void set_vector_length_call(CardChannel _cc, int _n1_host_arg, int _n2_host_arg)
          Call step set_vector_length of protocol Vector_length on the card.
 long vector_exp_1_call(CardChannel _cc)
          Call step vector_exp_1 of protocol Vector_exp on the card.
 long vector_exp_2_call(CardChannel _cc)
          Call step vector_exp_2 of protocol Vector_exp on the card.
 void vector_exp_choose_mod_call(CardChannel _cc, int _vector_exp_variant_host_arg)
          Call step vector_exp_choose_mod of protocol Vector_exp on the card.
 void vector_exp_init_call(CardChannel _cc, Host_vector _bignats_base_host_arg, Host_vector _bignats_exponent_host_arg, Host_modulus _vec_exp_modulus_host_arg, int _n1_host_arg, Host_vector _bignats_base_factors_host_arg, BigInteger _one_or_correction_host_arg, boolean _keep_modulus_host_arg)
          Call step vector_exp_init of protocol Vector_exp on the card.
 BigInteger vector_exp_result_call(CardChannel _cc)
          Call step vector_exp_result of protocol Vector_exp on the card.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

protocol_description

private Exponent_perf_description protocol_description
A protocol description instance from Exponent_perf.id. Used to access the host initializers, which are additional parameters for the APDU type constructors of arguments or results. Initialized in the constructor.


out

private PrintWriter out
The output channel for debugging information of the OV-chip protocol layer. Initialized in the constructor.


with_apdu_script

private boolean with_apdu_script
Controls apdutool line printing. Initialized in the constructor, if true, the OV-chip protocol layer prints apdutool lines as part of its debugging output.


hp_set_vector_length

private Host_protocol hp_set_vector_length
Host protocol instance for step set_vector_length of protocol Vector_length. Initialized via init_hp_set_vector_length (which is called from the constructor).


hp_vector_exp_choose_mod

private Host_protocol hp_vector_exp_choose_mod
Host protocol instance for step vector_exp_choose_mod of protocol Vector_exp. Initialized via init_hp_vector_exp_choose_mod (which is called from the constructor).


hp_vector_exp_init

private Host_protocol hp_vector_exp_init
Host protocol instance for step vector_exp_init of protocol Vector_exp. Initialized via init_hp_vector_exp_init (which is called from the constructor).


hp_vector_exp_1

private Host_protocol hp_vector_exp_1
Host protocol instance for step vector_exp_1 of protocol Vector_exp. Initialized via init_hp_vector_exp_1 (which is called from the constructor).


hp_vector_exp_2

private Host_protocol hp_vector_exp_2
Host protocol instance for step vector_exp_2 of protocol Vector_exp. Initialized via init_hp_vector_exp_2 (which is called from the constructor).


hp_vector_exp_result

private Host_protocol hp_vector_exp_result
Host protocol instance for step vector_exp_result of protocol Vector_exp. Initialized via init_hp_vector_exp_result (which is called from the constructor).

Constructor Detail

Exponent_perf_stubs

public Exponent_perf_stubs(Exponent_perf_description d,
                           PrintWriter o,
                           boolean script)
Stub constructor. Initializes all host protocol instances from Exponent_perf.id.

Parameters:
d - protocol description instance for Exponent_perf.id
o - channel for printing debugging information, pass null for disabling debugging information
script - if true, print apdutool lines for all APDUs as part of the debugging information.
Method Detail

init_hp_set_vector_length

private void init_hp_set_vector_length(Exponent_perf_description d,
                                       PrintWriter out,
                                       boolean script)
Initialization method for hp_set_vector_length.

Parameters:
d - description instance for Exponent_perf.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

set_vector_length_call

public void set_vector_length_call(CardChannel _cc,
                                   int _n1_host_arg,
                                   int _n2_host_arg)
                            throws CardException
Call step set_vector_length of protocol Vector_length on the card.

Parameters:
_cc - communication channel to the applet, must not be null
_n1_host_arg - argument n1 to be converted to APDU_short
_n2_host_arg - argument n2 to be converted to APDU_short
Throws:
CardException - in case of communication errors

init_hp_vector_exp_choose_mod

private void init_hp_vector_exp_choose_mod(Exponent_perf_description d,
                                           PrintWriter out,
                                           boolean script)
Initialization method for hp_vector_exp_choose_mod.

Parameters:
d - description instance for Exponent_perf.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

vector_exp_choose_mod_call

public void vector_exp_choose_mod_call(CardChannel _cc,
                                       int _vector_exp_variant_host_arg)
                                throws CardException
Call step vector_exp_choose_mod of protocol Vector_exp on the card.

Parameters:
_cc - communication channel to the applet, must not be null
_vector_exp_variant_host_arg - argument vector_exp_variant to be converted to APDU_short
Throws:
CardException - in case of communication errors

init_hp_vector_exp_init

private void init_hp_vector_exp_init(Exponent_perf_description d,
                                     PrintWriter out,
                                     boolean script)
Initialization method for hp_vector_exp_init.

Parameters:
d - description instance for Exponent_perf.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

vector_exp_init_call

public void vector_exp_init_call(CardChannel _cc,
                                 Host_vector _bignats_base_host_arg,
                                 Host_vector _bignats_exponent_host_arg,
                                 Host_modulus _vec_exp_modulus_host_arg,
                                 int _n1_host_arg,
                                 Host_vector _bignats_base_factors_host_arg,
                                 BigInteger _one_or_correction_host_arg,
                                 boolean _keep_modulus_host_arg)
                          throws CardException
Call step vector_exp_init of protocol Vector_exp on the card.

Parameters:
_cc - communication channel to the applet, must not be null
_bignats_base_host_arg - argument bignats.base to be converted to Vector
_bignats_exponent_host_arg - argument bignats.exponent to be converted to Vector
_vec_exp_modulus_host_arg - argument vec_exp_modulus to be converted to Modulus
_n1_host_arg - argument n1 to be converted to APDU_short
_bignats_base_factors_host_arg - argument bignats.base_factors to be converted to Vector
_one_or_correction_host_arg - argument one_or_correction to be converted to Bignat
_keep_modulus_host_arg - argument keep_modulus to be converted to APDU_boolean
Throws:
CardException - in case of communication errors

init_hp_vector_exp_1

private void init_hp_vector_exp_1(Exponent_perf_description d,
                                  PrintWriter out,
                                  boolean script)
Initialization method for hp_vector_exp_1.

Parameters:
d - description instance for Exponent_perf.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

vector_exp_1_call

public long vector_exp_1_call(CardChannel _cc)
                       throws CardException
Call step vector_exp_1 of protocol Vector_exp on the card.

Parameters:
_cc - communication channel to the applet, must not be null
Returns:
Duration of the call in nanoseconds. The measurement includes (de-)serialization but not the allocation of argument and result arrays.
Throws:
CardException - in case of communication errors

init_hp_vector_exp_2

private void init_hp_vector_exp_2(Exponent_perf_description d,
                                  PrintWriter out,
                                  boolean script)
Initialization method for hp_vector_exp_2.

Parameters:
d - description instance for Exponent_perf.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

vector_exp_2_call

public long vector_exp_2_call(CardChannel _cc)
                       throws CardException
Call step vector_exp_2 of protocol Vector_exp on the card.

Parameters:
_cc - communication channel to the applet, must not be null
Returns:
Duration of the call in nanoseconds. The measurement includes (de-)serialization but not the allocation of argument and result arrays.
Throws:
CardException - in case of communication errors

init_hp_vector_exp_result

private void init_hp_vector_exp_result(Exponent_perf_description d,
                                       PrintWriter out,
                                       boolean script)
Initialization method for hp_vector_exp_result.

Parameters:
d - description instance for Exponent_perf.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

vector_exp_result_call

public BigInteger vector_exp_result_call(CardChannel _cc)
                                  throws CardException
Call step vector_exp_result of protocol Vector_exp on the card.

Parameters:
_cc - communication channel to the applet, must not be null
Returns:
result result converted from Bignat
Throws:
CardException - in case of communication errors