MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
encryption.h
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3 #include "dtsc.h"
4 
5 namespace Encryption {
6  class verimatrixData {
7  public:
8  void read(const char * shmPage);
9  void write(char * shmPage);
10  std::string url;
11  std::string name;
12  std::string key;
13  std::string keyid;
14  std::string keyseed;
15  std::string laurl;
16  std::string lauurl;
17  };
18 
19  std::string hexString(const char * data, unsigned long dataLen);
20 
21  std::string AES_Crypt(const std::string & data, const std::string & key, std::string & ivec);
22  std::string AES_Crypt(const char * data, int dataLen, const char * key, const char * ivec);
23 
24  //These functions are dangerous for your data
25  void AESFullCrypt(char * data, int dataLen, const char * key, const char * ivec);
26  void AESPartialCrypt(char * data, int dataLen, char * expandedKey, char * eCount, char * iVec, unsigned int & num, bool & initialize);
27 
28  std::string PR_GenerateContentKey(std::string & keyseed, std::string & keyid);
29  std::string PR_GuidToByteArray(std::string & guid);
30 
31  void encryptPlayReady(DTSC::Packet & pack, std::string & codec, const char * iVec, const char * key);
32 
33  void fillVerimatrix(verimatrixData & vmData);
34 }
std::string laurl
Definition: encryption.h:15
void AESFullCrypt(char *data, int dataLen, const char *key, const char *ivec)
This function encrypts data in-place.
Definition: encryption.cpp:105
void read(const char *shmPage)
Definition: encryption.cpp:200
std::string key
Definition: encryption.h:12
Definition: encryption.h:6
std::string hexString(const char *data, unsigned long dataLen)
helper function for printing binary values
Definition: encryption.cpp:18
std::string PR_GuidToByteArray(std::string &guid)
Definition: encryption.cpp:87
std::string lauurl
Definition: encryption.h:16
std::string url
Definition: encryption.h:10
std::string keyid
Definition: encryption.h:13
std::string AES_Crypt(const std::string &data, const std::string &key, std::string &ivec)
Definition: encryption.cpp:30
Definition: encryption.cpp:16
void encryptPlayReady(DTSC::Packet &thisPack, std::string &codec, const char *iVec, const char *key)
Definition: encryption.cpp:116
std::string keyseed
Definition: encryption.h:14
void write(char *shmPage)
Definition: encryption.cpp:217
void fillVerimatrix(verimatrixData &vmData)
Definition: encryption.cpp:180
std::string PR_GenerateContentKey(std::string &keyseed, std::string &keyid)
Definition: encryption.cpp:65
DTSC::Packets can currently be three types: DTSC_HEAD packets are the "DTSC" header string...
Definition: dtsc.h:100
std::string name
Definition: encryption.h:11
void AESPartialCrypt(char *data, int dataLen, char *expandedKey, char *eCount, char *iVec, unsigned int &num, bool &initialize)
This function encrypts data in-place.
Definition: encryption.cpp:46