|
SASC-NG
DVBSoftCAM
|
#include <system-common.h>
Inheritance diagram for cPlainKeyStd:Public Member Functions | |
| cPlainKeyStd (bool Super) | |
| virtual bool | Parse (const char *line) |
Definition at line 81 of file system-common.h.
| cPlainKeyStd::cPlainKeyStd | ( | bool | Super | ) |
Definition at line 139 of file system-common.c.
:cHexKey(Super) {}
| bool cPlainKeyStd::Parse | ( | const char * | line | ) | [virtual] |
Reimplemented from cHexKey.
Reimplemented in cPlainKeyVia.
Definition at line 143 of file system-common.c.
References Bin2Int, GetChar(), GetHex(), cPlainKey::keynr, PLAINLEN_STD, cHexKey::SetBinKey(), and cPlainKey::type.
{
unsigned char sid[3], skeynr, skey[PLAINLEN_STD];
int len;
if(GetChar(line,&type,1) && (len=GetHex(line,sid,3,false)) &&
GetHex(line,&skeynr,1) && GetHex(line,skey,PLAINLEN_STD)) {
type=toupper(type); id=Bin2Int(sid,len); keynr=skeynr;
SetBinKey(skey,PLAINLEN_STD);
return true;
}
return false;
}