SASC
DVBSoftCAM

cSeca2ProvSSE Class Reference

Inheritance diagram for cSeca2ProvSSE:

List of all members.

Public Member Functions

 cSeca2ProvSSE (unsigned short Id)
virtual ~cSeca2ProvSSE ()
virtual bool Init (void)
 cSeca2ProvSSE (unsigned short Id)
virtual ~cSeca2ProvSSE ()
virtual bool Init (void)

Protected Member Functions

virtual bool InitSSE (void)=0
virtual void PreSSE (unsigned char *data, int pos)
virtual void PostSSE (unsigned char *data, int pos)
const unsigned char * SSET1 (void) const
const unsigned char * SSET2 (void) const
const unsigned char * SSEPT1 (void) const
const unsigned char * SSEPT2 (void) const
const unsigned char * CWT1 (void) const
virtual bool InitSSE (void)=0
virtual void PreSSE (unsigned char *data, int pos)
virtual void PostSSE (unsigned char *data, int pos)
const unsigned char * SSET1 (void) const
const unsigned char * SSET2 (void) const
const unsigned char * SSEPT1 (void) const
const unsigned char * SSEPT2 (void) const
const unsigned char * CWT1 (void) const

Protected Attributes

cDes des
cFileMap * sse
cFileMap * sseP
cFileMap * cw

Detailed Description

Definition at line 651 of file seca.c.


Constructor & Destructor Documentation

cSeca2ProvSSE::cSeca2ProvSSE ( unsigned short  Id)

Definition at line 677 of file seca.c.

References cw, sse, and sseP.

:cSeca2Prov(Id)
,des(secaPC1,secaPC2)
{
  sse=0; sseP=0; cw=0;
}
cSeca2ProvSSE::~cSeca2ProvSSE ( ) [virtual]

Definition at line 684 of file seca.c.

References cw, sse, sseP, and cFileMap::Unmap().

{
  if(sse)  sse->Unmap();
  if(sseP) sseP->Unmap();
  if(cw)   cw->Unmap();
}
cSeca2ProvSSE::cSeca2ProvSSE ( unsigned short  Id)
virtual cSeca2ProvSSE::~cSeca2ProvSSE ( ) [virtual]

Member Function Documentation

const unsigned char* cSeca2ProvSSE::CWT1 ( void  ) const [inline, protected]

Definition at line 670 of file seca.c.

References cFileMap::Addr(), and cw.

Referenced by cSeca2ProvNL::PostCW(), and cSeca2ProvFR::PostCW().

{ return cw->Addr(); }
const unsigned char* cSeca2ProvSSE::CWT1 ( void  ) const [inline, protected]

Definition at line 670 of file seca.c.

References cFileMap::Addr(), and cw.

{ return cw->Addr(); }
bool cSeca2ProvSSE::Init ( void  ) [virtual]

Reimplemented from cSeca2Prov.

Definition at line 691 of file seca.c.

References InitSSE().

{
  return InitSSE() && cSeca2Prov::Init();
}
virtual bool cSeca2ProvSSE::Init ( void  ) [virtual]

Reimplemented from cSeca2Prov.

virtual bool cSeca2ProvSSE::InitSSE ( void  ) [protected, pure virtual]

Implemented in cSeca2ProvFR, cSeca2ProvNL, cSeca2ProvFR, and cSeca2ProvNL.

Referenced by Init().

virtual bool cSeca2ProvSSE::InitSSE ( void  ) [protected, pure virtual]
void cSeca2ProvSSE::PostSSE ( unsigned char *  data,
int  pos 
) [protected, virtual]

Reimplemented from cSeca2Prov.

Definition at line 709 of file seca.c.

References afterSig, beforeSig, cSeca2Prov::CalcSHASignature(), cDes::Des(), des, and SECA_DES_ENCR.

{
  PostSSECore1(data,pos);
  // create the SHA hash buffer
  unsigned char tmpBuf[64];
  memcpy(tmpBuf+0,&data[beforeSig+0],4);
  memcpy(tmpBuf+4,&data[afterSig +4],4);
  PostSSECore2(tmpBuf+8,data,pos);
  // Calc Signature of the generated buffer here
  unsigned char MD[20];
  CalcSHASignature(tmpBuf,sizeof(tmpBuf),MD,false);
  // Prepare DES data
  memcpy(tmpBuf+0,&data[beforeSig+4],4);
  memcpy(tmpBuf+4,&data[afterSig +0],4);
  // DES Enrypt
  des.Des(tmpBuf,MD,SECA_DES_ENCR);
  // modify data with encrypted DES data
  PostSSECore3(data,tmpBuf,pos);
  // save the signature
  memcpy(tmpBuf,data+afterSig,8);
  PostSSECore4(data,pos);
  // put the signature in the data
  memcpy(data+beforeSig,tmpBuf,8);
}
virtual void cSeca2ProvSSE::PostSSE ( unsigned char *  data,
int  pos 
) [protected, virtual]

Reimplemented from cSeca2Prov.

void cSeca2ProvSSE::PreSSE ( unsigned char *  data,
int  pos 
) [protected, virtual]

Reimplemented from cSeca2Prov.

Definition at line 696 of file seca.c.

References j, and SSEPT1().

{
  const unsigned char *T1=SSEPT1();
  unsigned char tmpBuf[80];

  data+=pos+5; // Start at offset 5
  for(int i=4; i>=0; i--) {
    int j=i*16;
    PreSSECore(&tmpBuf[j],&data[j],i);
    }
  for(int i=79; i>=0; i--) data[i]=tmpBuf[i]^T1[i];
}
virtual void cSeca2ProvSSE::PreSSE ( unsigned char *  data,
int  pos 
) [protected, virtual]

Reimplemented from cSeca2Prov.

const unsigned char* cSeca2ProvSSE::SSEPT1 ( void  ) const [inline, protected]

Definition at line 668 of file seca.c.

References cFileMap::Addr(), and sseP.

Referenced by PreSSE().

{ return sseP->Addr(); }
const unsigned char* cSeca2ProvSSE::SSEPT1 ( void  ) const [inline, protected]

Definition at line 668 of file seca.c.

References cFileMap::Addr(), and sseP.

{ return sseP->Addr(); }
const unsigned char* cSeca2ProvSSE::SSEPT2 ( void  ) const [inline, protected]

Definition at line 669 of file seca.c.

References cFileMap::Addr(), and sseP.

{ return sseP->Addr()+80; }
const unsigned char* cSeca2ProvSSE::SSEPT2 ( void  ) const [inline, protected]

Definition at line 669 of file seca.c.

References cFileMap::Addr(), and sseP.

Referenced by cSeca2ProvNL::PostCW(), cSeca2ProvFR::PostCW(), and cSeca2ProvFR::SignatureMod().

{ return sseP->Addr()+80; }
const unsigned char* cSeca2ProvSSE::SSET1 ( void  ) const [inline, protected]

Definition at line 666 of file seca.c.

References cFileMap::Addr(), and sse.

Referenced by cSeca2ProvNL::ChainTableXor(), cSeca2ProvFR::ChainTableXor(), cSeca2ProvNL::PostCW(), and cSeca2ProvFR::PostCW().

{ return sse->Addr(); }
const unsigned char* cSeca2ProvSSE::SSET1 ( void  ) const [inline, protected]

Definition at line 666 of file seca.c.

References cFileMap::Addr(), and sse.

{ return sse->Addr(); }
const unsigned char* cSeca2ProvSSE::SSET2 ( void  ) const [inline, protected]

Definition at line 667 of file seca.c.

References cFileMap::Addr(), and sse.

{ return sse->Addr()+3072; }
const unsigned char* cSeca2ProvSSE::SSET2 ( void  ) const [inline, protected]

Definition at line 667 of file seca.c.

References cFileMap::Addr(), and sse.

Referenced by cSeca2ProvNL::PostCW(), and cSeca2ProvFR::PostCW().

{ return sse->Addr()+3072; }

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines