#include "system-common.h"
#include "data.h"
+#include "opts.h"
#include "helper.h"
#include "crypto.h"
#include "misc.h"
} \
LBEND();
+int minEcmTime=150; // ms
+
// -- cCwDes -------------------------------------------------------------------
static const unsigned char cryptoPC1[] = {
bool cSystemCryptoworks::ProcessECM(const cEcmInfo *ecmInfo, unsigned char *data)
{
+ cTimeMs minTime;
int len=SCT_LEN(data);
if(data[ECM_NANO_LEN]!=len-ECM_NANO_START) {
PRINTF(L_SYS_ECM,"invalid ECM structure");
memcpy(cw,&data[i+2],16);
LDUMP(L_SYS_VERBOSE,cw,16,"cw:");
ks.OK(pk);
+ int i=minEcmTime-minTime.Elapsed();
+ if(i>0) cCondWait::SleepMs(i);
return true;
}
break;
cSystemLinkCryptoworks::cSystemLinkCryptoworks(void)
:cSystemLink(SYSTEM_NAME,SYSTEM_PRI)
{
+ opts=new cOpts(SYSTEM_NAME,1);
+ opts->Add(new cOptInt("MinEcmTime",trNOOP("Cryptoworks: min. ECM processing time"),&minEcmTime,0,5000));
Feature.NeedsKeyFile();
}