|
SASC
DVBSoftCAM
|
Inheritance diagram for cSmartCardDataCryptoworks:Public Member Functions | |
| cSmartCardDataCryptoworks (void) | |
| cSmartCardDataCryptoworks (eDataType Type, unsigned char *Id) | |
| virtual bool | Parse (const char *line) |
| virtual bool | Matches (cSmartCardData *param) |
| cSmartCardDataCryptoworks (void) | |
| cSmartCardDataCryptoworks (eDataType Type, unsigned char *Id) | |
| virtual bool | Parse (const char *line) |
| virtual bool | Matches (cSmartCardData *param) |
Public Attributes | |
| eDataType | type |
| unsigned char | id [5] |
| unsigned char | pin [4] |
| cBN | key |
Definition at line 109 of file sc-cryptoworks.c.
| cSmartCardDataCryptoworks::cSmartCardDataCryptoworks | ( | void | ) |
Definition at line 123 of file sc-cryptoworks.c.
:cSmartCardData(SC_ID) {}
| cSmartCardDataCryptoworks::cSmartCardDataCryptoworks | ( | eDataType | Type, |
| unsigned char * | Id | ||
| ) |
Definition at line 127 of file sc-cryptoworks.c.
References type.
:cSmartCardData(SC_ID) { type=Type; memset(id,0,sizeof(id)); memcpy(id,Id,IdLen()); }
| cSmartCardDataCryptoworks::cSmartCardDataCryptoworks | ( | void | ) |
| cSmartCardDataCryptoworks::cSmartCardDataCryptoworks | ( | eDataType | Type, |
| unsigned char * | Id | ||
| ) |
| bool cSmartCardDataCryptoworks::Matches | ( | cSmartCardData * | param | ) | [virtual] |
Implements cSmartCardData.
Definition at line 135 of file sc-cryptoworks.c.
{
cSmartCardDataCryptoworks *cd=(cSmartCardDataCryptoworks *)param;
return cd->type==type && !memcmp(cd->id,id,IdLen());
}
| virtual bool cSmartCardDataCryptoworks::Matches | ( | cSmartCardData * | param | ) | [virtual] |
Implements cSmartCardData.
| virtual bool cSmartCardDataCryptoworks::Parse | ( | const char * | line | ) | [virtual] |
Implements cSmartCardData.
| bool cSmartCardDataCryptoworks::Parse | ( | const char * | line | ) | [virtual] |
Implements cSmartCardData.
Definition at line 141 of file sc-cryptoworks.c.
References dtIPK, dtPIN, dtUCPK, GetHex(), i, key, L_CORE_LOAD, pin, PRINTF, skipspace(), and type.
{
line=skipspace(line);
if(!strncasecmp(line,"IPK",3)) { type=dtIPK; line+=3; }
else if(!strncasecmp(line,"UCPK",4)) { type=dtUCPK; line+=4; }
else if(!strncasecmp(line,"PIN",3)) { type=dtPIN; line+=3; }
else {
PRINTF(L_CORE_LOAD,"smartcarddatacryptoworks: format error: datatype");
return false;
}
line=skipspace(line);
if(GetHex(line,id,IdLen())!=IdLen()) {
PRINTF(L_CORE_LOAD,"smartcarddatacryptoworks: format error: caid/serial");
return false;
}
line=skipspace(line);
if(type==dtPIN) {
for(int i=0; i<4; i++) {
if(!isdigit(*line)) {
PRINTF(L_CORE_LOAD,"smartcarddatacryptoworks: format error: pin");
return false;
}
pin[i]=*line++;
}
}
else {
unsigned char buff[64];
if(GetHex(line,buff,64,true)!=64) {
PRINTF(L_CORE_LOAD,"smartcarddatacryptoworks: format error: ipk/ucpk");
return false;
}
BN_bin2bn(buff,64,key);
}
return true;
}
| unsigned char cSmartCardDataCryptoworks::id |
Definition at line 114 of file sc-cryptoworks.c.
Referenced by Matches().
Definition at line 115 of file sc-cryptoworks.c.
Referenced by cSmartCardCryptoworks::Init(), and Parse().
| unsigned char cSmartCardDataCryptoworks::pin |
Definition at line 114 of file sc-cryptoworks.c.
Referenced by cSmartCardCryptoworks::Init(), and Parse().
Definition at line 113 of file sc-cryptoworks.c.
Referenced by cSmartCardDataCryptoworks(), Matches(), and Parse().