#ifndef morpheo_behavioural_custom_encryption_h
#define morpheo_behavioural_custom_encryption_h

/*
 * $Id: Encryption.h 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Custom/include/Custom.h"

namespace morpheo {
namespace behavioural {
namespace custom {
namespace encryption {

  enum 
    {
      num_register_key  ,
      num_register_shift,
      num_register_role 
    };

  class Encryption
  {
  private : const  Toperation_t _operation_encrypt;
  private : const  Toperation_t _operation_decrypt;
    
  public  : Encryption (uint32_t     num_group,
			Toperation_t operation_encrypt,
			Toperation_t operation_decrypt);
    
  public  : uint32_t                      get_nb_register               (void);
  public  : access_mode_t                 get_access_mode               (uint32_t     reg);
  public  : custom_decod_t              * get_custom_decod              (Toperation_t operation);
  public  : custom_execute_genMoore_t   * get_custom_execute_genMoore   (Toperation_t operation);
  public  : custom_execute_transition_t * get_custom_execute_transition (void);
  public  : custom_execute_transition_t * get_custom_execute_reset      (void);
  
  private : static void function_encrypt (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_operation_t * op,
					  morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  * reg,
					  morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     * param);
  private : static void function_decrypt (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_operation_t * op,
					  morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  * reg,
					  morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     * param);
  };
  
}; // end namespace encryption 
}; // end namespace custom
}; // end namespace behavioural
}; // end namespace morpheo              

#endif
