MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Data Structures | Functions
Encryption Namespace Reference

Data Structures

class  verimatrixData
 

Functions

std::string AES_Crypt (const std::string &data, const std::string &key, std::string &ivec)
 
std::string AES_Crypt (const char *data, int dataLen, const char *key, const char *ivec)
 
void AESFullCrypt (char *data, int dataLen, const char *key, const char *ivec)
 This function encrypts data in-place. More...
 
void AESPartialCrypt (char *data, int dataLen, char *expandedKey, char *eCount, char *iVec, unsigned int &num, bool &initialize)
 This function encrypts data in-place. More...
 
std::string binKey (std::string hexkey)
 Converts a hexidecimal string format key to binary string format. More...
 
void encryptPlayReady (DTSC::Packet &thisPack, std::string &codec, const char *iVec, const char *key)
 
void fillVerimatrix (verimatrixData &vmData)
 
std::string hex (char dec)
 Helper function for urlescape. More...
 
std::string hex (const std::string &input)
 
std::string hexString (const char *data, unsigned long dataLen)
 helper function for printing binary values More...
 
std::string PR_GenerateContentKey (std::string &keyseed, std::string &keyid)
 
std::string PR_GuidToByteArray (std::string &guid)
 

Function Documentation

std::string Encryption::AES_Crypt ( const std::string &  data,
const std::string &  key,
std::string &  ivec 
)
std::string Encryption::AES_Crypt ( const char *  data,
int  dataLen,
const char *  key,
const char *  ivec 
)
void Encryption::AESFullCrypt ( char *  data,
int  dataLen,
const char *  key,
const char *  ivec 
)

This function encrypts data in-place.

void Encryption::AESPartialCrypt ( char *  data,
int  dataLen,
char *  expandedKey,
char *  eCount,
char *  iVec,
unsigned int &  num,
bool &  initialize 
)

This function encrypts data in-place.

It alters all parameters except dataLen. Do not use it unless you know what you are doing.

Before use, make sure the iVec is in the UPPER 8 bytes

Before use, make sure this is not the only copy of the key you had. It is lost upon initialization

std::string Encryption::binKey ( std::string  hexkey)

Converts a hexidecimal string format key to binary string format.

void Encryption::encryptPlayReady ( DTSC::Packet thisPack,
std::string &  codec,
const char *  iVec,
const char *  key 
)
void Encryption::fillVerimatrix ( verimatrixData vmData)
std::string Encryption::hex ( char  dec)

Helper function for urlescape.

Encodes a character as two hex digits.

std::string Encryption::hex ( const std::string &  input)
std::string Encryption::hexString ( const char *  data,
unsigned long  dataLen 
)

helper function for printing binary values

std::string Encryption::PR_GenerateContentKey ( std::string &  keyseed,
std::string &  keyid 
)
std::string Encryption::PR_GuidToByteArray ( std::string &  guid)