SASC-NG
DVBSoftCAM

cSmartCardDataVideoGuard2 Class Reference

Inheritance diagram for cSmartCardDataVideoGuard2:

List of all members.

Public Member Functions

 cSmartCardDataVideoGuard2 (void)
 cSmartCardDataVideoGuard2 (eDataType Type)
virtual bool Parse (const char *line)
virtual bool Matches (cSmartCardData *param)

Public Attributes

eDataType type
unsigned char boxid [4]
unsigned char seed0 [64]
unsigned char seed1 [64]

Detailed Description

Definition at line 100 of file sc-videoguard2.c.


Constructor & Destructor Documentation

cSmartCardDataVideoGuard2::cSmartCardDataVideoGuard2 ( void  )

Definition at line 112 of file sc-videoguard2.c.

cSmartCardDataVideoGuard2::cSmartCardDataVideoGuard2 ( eDataType  Type)

Definition at line 116 of file sc-videoguard2.c.

References type.


Member Function Documentation

bool cSmartCardDataVideoGuard2::Matches ( cSmartCardData *  param) [virtual]

Implements cSmartCardData.

Definition at line 122 of file sc-videoguard2.c.

References type.

bool cSmartCardDataVideoGuard2::Parse ( const char *  line) [virtual]

Implements cSmartCardData.

Definition at line 128 of file sc-videoguard2.c.

References boxid, dtBoxId, dtSeed, GetHex(), L_CORE_LOAD, PRINTF, seed0, seed1, skipspace(), and type.

{
  line=skipspace(line);
  if(!strncasecmp(line,"BOXID",5))     { type=dtBoxId; line+=5; }
  else if(!strncasecmp(line,"SEED",4)) { type=dtSeed; line+=4; }
  else {
    PRINTF(L_CORE_LOAD,"smartcarddatavideoguard2: format error: datatype");
    return false;
    }
  line=skipspace(line);
  switch(type) {
    case dtBoxId:
      if(GetHex(line,boxid,sizeof(boxid))!=sizeof(boxid)) {
        PRINTF(L_CORE_LOAD,"smartcarddatavideoguard2: format error: boxid");
        return false;
        }
      break;
    case dtSeed:
      if(GetHex(line,seed0,sizeof(seed0))!=sizeof(seed0)) {
        PRINTF(L_CORE_LOAD,"smartcarddatacryptoworks: format error: seed0");
        return false;
        }
      line=skipspace(line);
      if(GetHex(line,seed1,sizeof(seed1))!=sizeof(seed1)) {
        PRINTF(L_CORE_LOAD,"smartcarddatacryptoworks: format error: seed1");
        return false;
        }
      break;
    }
  return true;
}

Member Data Documentation

Definition at line 103 of file sc-videoguard2.c.

Referenced by cSmartCardVideoGuard2::Init(), and Parse().

Definition at line 104 of file sc-videoguard2.c.

Referenced by cSmartCardVideoGuard2::Init(), and Parse().

Definition at line 104 of file sc-videoguard2.c.

Referenced by cSmartCardVideoGuard2::Init(), and Parse().


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