SASC
DVBSoftCAM

cTpsKey Class Reference

#include <tps.h>

Inheritance diagram for cTpsKey:

List of all members.

Public Member Functions

 cTpsKey (void)
const unsigned char * Key (int st) const
int Mode (int st) const
int Opmode (void) const
time_t Timestamp (void) const
void Set (const cTpsKey *k)
void Set (const unsigned char *mem)
virtual cString ToString (bool hide=false)
 cTpsKey (void)
const unsigned char * Key (int st) const
int Mode (int st) const
int Opmode (void) const
time_t Timestamp (void) const
void Set (const cTpsKey *k)
void Set (const unsigned char *mem)
virtual cString ToString (bool hide=false)

Detailed Description

Definition at line 71 of file tps.h.


Constructor & Destructor Documentation

cTpsKey::cTpsKey ( void  )

Definition at line 457 of file tps.c.

{
  timestamp=0;
}
cTpsKey::cTpsKey ( void  )

Member Function Documentation

const unsigned char* cTpsKey::Key ( int  st) const [inline]

Definition at line 83 of file tps.h.

Referenced by cTPS::Decrypt().

{ return step[st].key; }
const unsigned char* cTpsKey::Key ( int  st) const [inline]

Definition at line 83 of file tps.h.

{ return step[st].key; }
int cTpsKey::Mode ( int  st) const [inline]

Definition at line 84 of file tps.h.

Referenced by cTPS::Decrypt().

{ return step[st].mode; }
int cTpsKey::Mode ( int  st) const [inline]

Definition at line 84 of file tps.h.

{ return step[st].mode; }
int cTpsKey::Opmode ( void  ) const [inline]

Definition at line 85 of file tps.h.

{ return opmode; }
int cTpsKey::Opmode ( void  ) const [inline]

Definition at line 85 of file tps.h.

Referenced by cTPS::Decrypt().

{ return opmode; }
void cTpsKey::Set ( const unsigned char *  mem)
void cTpsKey::Set ( const cTpsKey *  k)
void cTpsKey::Set ( const cTpsKey *  k)

Definition at line 462 of file tps.c.

Referenced by cTpsKeys::GetV2Key(), and cTpsKeys::ParseLinePlain().

{
  timestamp=k->timestamp;
  opmode=k->opmode;
  memcpy(step,k->step,sizeof(step));
}
void cTpsKey::Set ( const unsigned char *  mem)

Definition at line 469 of file tps.c.

References i, and key.

{
  timestamp=*((unsigned int *)mem);
  if((unsigned int)timestamp>0x7FFFFFFFUL) timestamp=0x7FFFFFFFL;
  opmode=mem[52+3];
  for(int i=0; i<3; i++) {
    memcpy(step[i].key,&mem[4+i*16],16);
    step[i].mode=mem[52+i];
    }
}
time_t cTpsKey::Timestamp ( void  ) const [inline]

Definition at line 86 of file tps.h.

{ return timestamp; }
time_t cTpsKey::Timestamp ( void  ) const [inline]

Definition at line 86 of file tps.h.

{ return timestamp; }
cString cTpsKey::ToString ( bool  hide = false) [virtual]

Reimplemented from cStructItem.

Definition at line 490 of file tps.c.

References crc32_le(), and HexStr().

{
  unsigned char tmp[60];
  Put(&tmp[4]);
  *((unsigned int *)tmp)=crc32_le(0,&tmp[4],sizeof(tmp)-4);
  char str[420];
  HexStr(str,tmp,sizeof(tmp));
  return str;
}
virtual cString cTpsKey::ToString ( bool  hide = false) [virtual]

Reimplemented from cStructItem.


Member Data Documentation

unsigned char cTpsKey::key[16]

Definition at line 77 of file tps.h.

Referenced by Set().

unsigned char cTpsKey::mode

Definition at line 76 of file tps.h.


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