|
SASC
DVBSoftCAM
|
Inheritance diagram for cPlainKeyCryptoworks:Public Member Functions | |
| cPlainKeyCryptoworks (bool Super) | |
| virtual bool | Parse (const char *line) |
| cPlainKeyCryptoworks (bool Super) | |
| virtual bool | Parse (const char *line) |
Protected Member Functions | |
| virtual bool | IsBNKey (void) const |
| virtual int | IdSize (void) |
| virtual cString | PrintKeyNr (void) |
| virtual bool | IsBNKey (void) const |
| virtual int | IdSize (void) |
| virtual cString | PrintKeyNr (void) |
Definition at line 342 of file cryptoworks.c.
| cPlainKeyCryptoworks::cPlainKeyCryptoworks | ( | bool | Super | ) |
Definition at line 354 of file cryptoworks.c.
:cDualKey(Super,true) {}
| cPlainKeyCryptoworks::cPlainKeyCryptoworks | ( | bool | Super | ) |
| virtual int cPlainKeyCryptoworks::IdSize | ( | void | ) | [inline, protected, virtual] |
| virtual int cPlainKeyCryptoworks::IdSize | ( | void | ) | [inline, protected, virtual] |
| bool cPlainKeyCryptoworks::IsBNKey | ( | void | ) | const [protected, virtual] |
Implements cDualKey.
Definition at line 358 of file cryptoworks.c.
References cPlainKey::keynr, and TYPE.
Referenced by Parse().
| virtual bool cPlainKeyCryptoworks::IsBNKey | ( | void | ) | const [protected, virtual] |
Implements cDualKey.
| bool cPlainKeyCryptoworks::Parse | ( | const char * | line | ) | [virtual] |
Implements cPlainKey.
Definition at line 363 of file cryptoworks.c.
References AUTOMEM, Bin2Int, CCID, CCTYP, GetChar(), GetHex(), IsBNKey(), cPlainKey::keynr, KEYSET, PLAINLEN_CW_CC, PLAINLEN_CW_D, PLAINLEN_CW_R, prov, cMutableKey::SetBinKey(), sid, skipspace(), and cPlainKey::type.
{
unsigned char sid[2], sprov;
if(GetChar(line,&type,1) && GetHex(line,sid,2) && GetHex(line,&sprov,1)) {
int keylen, prov;
type=toupper(type); id=Bin2Int(sid,2); prov=sprov;
line=skipspace(line);
bool ok;
if(!strncasecmp(line,"CC",2)) { // cardkey
keynr=KEYSET(prov,CCTYP,CCID);
keylen=PLAINLEN_CW_CC;
line+=2;
ok=true;
}
else {
unsigned char sid, styp;
ok=GetHex(line,&styp,1) && GetHex(line,&sid,1);
keynr=KEYSET(prov,styp,sid);
keylen=IsBNKey() ? PLAINLEN_CW_R : PLAINLEN_CW_D;
}
if(ok) {
unsigned char *skey=AUTOMEM(keylen);
if(GetHex(line,skey,keylen)) {
SetBinKey(skey,keylen);
return true;
}
}
}
return false;
}
| virtual bool cPlainKeyCryptoworks::Parse | ( | const char * | line | ) | [virtual] |
Implements cPlainKey.
| cString cPlainKeyCryptoworks::PrintKeyNr | ( | void | ) | [protected, virtual] |
Reimplemented from cPlainKey.
Definition at line 394 of file cryptoworks.c.
References CCID, CCTYP, ID, cPlainKey::keynr, PROV, prov, cString::sprintf(), and TYPE.
| virtual cString cPlainKeyCryptoworks::PrintKeyNr | ( | void | ) | [protected, virtual] |
Reimplemented from cPlainKey.