// Machine generated C++ stub file (.cpp) for remote object Service
// Created on : 12/12/2011 16:45:03

#ifdef WIN32
#include <windows.h>
#endif
#include <winscard.h>
#include "Service.h"

using namespace std;
using namespace Marshaller;


// Constructors
Service::Service(string* uri) : SmartCardMarshaller(NULL, 0, uri, (u4)0xE38E8F, (u2)0xBAC2, 0) { return; }
Service::Service(string* uri, u4 index) : SmartCardMarshaller(NULL, 0, uri, (u4)0xE38E8F, (u2)0xBAC2, index) { return; }
Service::Service(u2 portNumber, string* uri) : SmartCardMarshaller(NULL, portNumber, uri, (u4)0xE38E8F, (u2)0xBAC2, 0) { return; }
Service::Service(u2 portNumber, string* uri, u4 index) : SmartCardMarshaller(NULL, portNumber, uri, (u4)0xE38E8F, (u2)0xBAC2, index) { return; }
Service::Service(string* readerName, string* uri) : SmartCardMarshaller(readerName, 0, uri, (u4)0xE38E8F, (u2)0xBAC2, 0) { return; }
Service::Service(string* readerName, u2 portNumber, string* uri) : SmartCardMarshaller(readerName, portNumber, uri, (u4)0xE38E8F, (u2)0xBAC2, 0) { return; }
Service::Service(SCARDHANDLE cardHandle, string* uri) : SmartCardMarshaller(cardHandle, 0, uri, (u4)0xE38E8F, (u2)0xBAC2) { return; }
Service::Service(SCARDHANDLE cardHandle, u2 portNumber, string* uri) : SmartCardMarshaller(cardHandle, portNumber, uri, (u4)0xE38E8F, (u2)0xBAC2) { return; }

// Pre-defined methods
std::string* Service::GetReader(void){return GetReaderName();}

// Exposed methods

u1Array* Service::DES_NovyIV(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0x2EB6, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::DES_NovyKlic(s4 KeySize){
	u1Array* _u1Array = NULL;
	Invoke(1, 0x80D5, MARSHALLER_TYPE_IN_S4, KeySize, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::AES_NovyIV(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0x9986, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::AES_NovyKlic(s4 KeySize){
	u1Array* _u1Array = NULL;
	Invoke(1, 0x10AF, MARSHALLER_TYPE_IN_S4, KeySize, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Enc_DES(u1Array* baze,u1Array* exponent,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(3, 0xF49F, MARSHALLER_TYPE_IN_U1ARRAY, baze, MARSHALLER_TYPE_IN_U1ARRAY, exponent, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Dec_DES(u1Array* baze,u1Array* exponent,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(3, 0x7D4C, MARSHALLER_TYPE_IN_U1ARRAY, baze, MARSHALLER_TYPE_IN_U1ARRAY, exponent, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Enc_AES(u1Array* baze,u1Array* exponent,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(3, 0xB6D8, MARSHALLER_TYPE_IN_U1ARRAY, baze, MARSHALLER_TYPE_IN_U1ARRAY, exponent, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Dec_AES(u1Array* baze,u1Array* exponent,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(3, 0xBCC9, MARSHALLER_TYPE_IN_U1ARRAY, baze, MARSHALLER_TYPE_IN_U1ARRAY, exponent, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


s4 Service::getMemory(){
	s4 _s4 = 0;
	Invoke(0, 0x40FB, MARSHALLER_TYPE_RET_S4, &_s4);
	return _s4;
}


u1Array* Service::Power(u1Array* baze,u1Array* exponent,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(3, 0xEFDB, MARSHALLER_TYPE_IN_U1ARRAY, baze, MARSHALLER_TYPE_IN_U1ARRAY, exponent, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::DePower(u1Array* baze,u1Array* exponent,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(3, 0x4348, MARSHALLER_TYPE_IN_U1ARRAY, baze, MARSHALLER_TYPE_IN_U1ARRAY, exponent, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


void Service::SetRSAsize(s4 size){
	Invoke(1, 0x5F95, MARSHALLER_TYPE_IN_S4, size, MARSHALLER_TYPE_RET_VOID);
}


u1Array* Service::Multiply(u1Array* a_byte,u1Array* b_byte,u1Array* mod_byte){
	u1Array* _u1Array = NULL;
	Invoke(3, 0x29F5, MARSHALLER_TYPE_IN_U1ARRAY, a_byte, MARSHALLER_TYPE_IN_U1ARRAY, b_byte, MARSHALLER_TYPE_IN_U1ARRAY, mod_byte, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::ArrAddSimple(u1Array* a,u1Array* b,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(3, 0x669E, MARSHALLER_TYPE_IN_U1ARRAY, a, MARSHALLER_TYPE_IN_U1ARRAY, b, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::ArrSubSimple(u1Array* a,u1Array* b,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(3, 0xDDCC, MARSHALLER_TYPE_IN_U1ARRAY, a, MARSHALLER_TYPE_IN_U1ARRAY, b, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::ArrHalfSimple(u1Array* input,u1Array* modulus){
	u1Array* _u1Array = NULL;
	Invoke(2, 0xFC3C, MARSHALLER_TYPE_IN_U1ARRAY, input, MARSHALLER_TYPE_IN_U1ARRAY, modulus, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::RandomGen(u1Array* input,s4 ofset,s4 length){
	u1Array* _u1Array = NULL;
	Invoke(3, 0xF703, MARSHALLER_TYPE_IN_U1ARRAY, input, MARSHALLER_TYPE_IN_S4, ofset, MARSHALLER_TYPE_IN_S4, length, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Getc11(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0x657A, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Getc22(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0x7C13, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Getc33(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0x2C00, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Getz1i(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0x214C, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Getz2(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0xF51A, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Getz2i(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0xFAC1, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Getc3(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0x76A2, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::Getz1(){
	u1Array* _u1Array = NULL;
	Invoke(0, 0x24AF, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::ArrMultiObecneOpt2(u1Array* a,u1Array* b){
	u1Array* _u1Array = NULL;
	Invoke(2, 0x874B, MARSHALLER_TYPE_IN_U1ARRAY, a, MARSHALLER_TYPE_IN_U1ARRAY, b, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::CombaOpt(u1Array* a,u1Array* b,s4 size){
	u1Array* _u1Array = NULL;
	Invoke(3, 0x0CDB, MARSHALLER_TYPE_IN_U1ARRAY, a, MARSHALLER_TYPE_IN_U1ARRAY, b, MARSHALLER_TYPE_IN_S4, size, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::ArrMultiMontgomeryREV(u1Array* x,u1Array* y,u1Array* m,s4 N,s4 mQ){
	u1Array* _u1Array = NULL;
	Invoke(5, 0x0531, MARSHALLER_TYPE_IN_U1ARRAY, x, MARSHALLER_TYPE_IN_U1ARRAY, y, MARSHALLER_TYPE_IN_U1ARRAY, m, MARSHALLER_TYPE_IN_S4, N, MARSHALLER_TYPE_IN_S4, mQ, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1 Service::UrciVetsiInt(u1Array* a,u1Array* b){
	u1 _u1 = 0;
	Invoke(2, 0xFA7C, MARSHALLER_TYPE_IN_U1ARRAY, a, MARSHALLER_TYPE_IN_U1ARRAY, b, MARSHALLER_TYPE_RET_BOOL, &_u1);
	return _u1;
}


u1Array* Service::RedukceByteArr(u1Array* a){
	u1Array* _u1Array = NULL;
	Invoke(1, 0xBF06, MARSHALLER_TYPE_IN_U1ARRAY, a, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}


u1Array* Service::ArrAddEqual(u1Array* a,u1Array* b){
	u1Array* _u1Array = NULL;
	Invoke(2, 0x9964, MARSHALLER_TYPE_IN_U1ARRAY, a, MARSHALLER_TYPE_IN_U1ARRAY, b, MARSHALLER_TYPE_RET_U1ARRAY, &_u1Array);
	return _u1Array;
}




