Mobile API Reference
MicroStrategy 2019
|
Classes | |
class | BadDataException |
class | BadDecryptionException |
class | BadEncryptionException |
class | BadHashException |
class | EncryptorDecryptor |
EncryptorDecryptor takes a string or Data object and encrypts or decrypts. More... | |
class | Hash |
Hash is a one way encryption that uses RIPEMD160 hashing algorithm. More... | |
class | RIPEMD160EncryptorDecryptor |
RIPEMD160EncryptorDecryptor is one implementation of the EncryptorDecryptor interface. More... | |
class | RIPEMD160Hasher |
RIPEMD160Hasher exposes a static method to hash binary data. More... | |
class | WCharConverter |
Typedefs | |
typedef MBase::StrongPtr< EncryptorDecryptor > | EncryptorDecryptorPtr |
Enumerations | |
enum | EncryptionVersion { SIMPLE = -2, RC4 = -1, TEA = 0, AES = 1 } |
Encryption algorithm. For details, do a google search of RC4 and/or TEA. More... | |
enum | HashingVersion { RIPEMD160 = 0, HashingVersionHighest } |
Functions | |
DLL_ENCRYPTOR_EXIM EncryptionVersion | GetHighestVersionRIPEMD160 () |
DLL_ENCRYPTOR_EXIM EncryptionVersion | GetHighestVersionMD5 () |
DLL_ENCRYPTOR_EXIM EncryptorDecryptor * | CreateRIPEMD160EncryptorDecryptor (const WCHAR *ipcKeySeed) |
RIPEMD160 KeySeed factory. More... | |
DLL_ENCRYPTOR_EXIM EncryptorDecryptor * | CreateRIPEMD160EncryptorDecryptor (MDataType::Binary *ipKey) |
RIPEMD160 KeySeed factory. More... | |
DLL_ENCRYPTOR_EXIM EncryptorDecryptor * | CreateMD5EncryptorDecryptor (const WCHAR *ipcKeySeed) |
MD5 KeySeed factory. More... | |
DLL_ENCRYPTOR_EXIM EncryptorDecryptor * | CreateSIMPLEEncryptorDecryptor () |
Simple Encryptor/Decryptor factory. More... | |
DLL_ENCRYPTOR_EXIM EncryptorDecryptor * | CreatePDEncryptorDecryptor (const WCHAR *ipcKeySeed, EncryptionVersion &irEncryptionVersion) |
Platform Dependent (PD) Encryptor/Decryptor factory. More... | |
DLL_ENCRYPTOR_EXIM MBase::ReturnWString | HexEncodeWithSignature (const MDataType::Binary *ipcData, unsigned Int32 inVersion, bool ibReverseHighLow=false, bool ibUpperCase=true) |
HexEncoder contains functions that perform conversion between binary data and its Hex representation. More... | |
DLL_ENCRYPTOR_EXIM MDataType::Binary * | HexDecodeWithSignature (const WCHAR *ipcData, bool ibReverseHighLow=false) |
Decode the string encoded with HexEncodeWithSignature. More... | |
DLL_ENCRYPTOR_EXIM MBase::ReturnWString | HexEncode (const MDataType::Binary *ipcData, bool ibReverseHighLow=false, bool ibUpperCase=true) |
Encode the given binary data into its Hex representation (without signature). More... | |
DLL_ENCRYPTOR_EXIM MDataType::Binary * | HexDecode (const WCHAR *ipcData, bool ibReverseHighLow=false) |
Decode the string encoded with HexEncode. More... | |
DLL_ENCRYPTOR_EXIM unsigned Int32 | GetVersion (const WCHAR *ipcEncodedData) |
Retrieve the version from the given encoded data (encoded with HexEncodeWithSignature) More... | |
DLL_ENCRYPTOR_EXIM MDataType::Binary * | AddHeader (const MDataType::Binary *ipcData, unsigned Int32 inVersion) |
DLL_ENCRYPTOR_EXIM MDataType::Binary * | RemoveHeader (const MDataType::Binary *ipcData) |
WCHAR * | hHexEncodeWithEncryptionLevel (const MDataType::Binary *ipcData, unsigned int inEncryptionLevel, unsigned int inHashVersion, bool ibReverseHighLow=false, bool ibUpperCase=true) |
MDataType::Binary * | HexDecodeWithEncryptionLevel (const WCHAR *ipcData, bool ibReverseHighLow) |
WCHAR * | hHexEncodeWithSignature (const MDataType::Binary *ipcData, unsigned int inVersion, bool ibReverseHighLow=false, bool ibUpperCase=true) |
The actual implementation of the encoding algorithm. More... | |
bool | ctoi (unsigned char iDigitChar, unsigned char &orDigit) |
Converts a character to a number. More... | |
WCHAR * | hHexEncode (const MDataType::Binary *ipcBinaryData, bool ibReverseHighLow=false, bool ibUpperCase=true) |
Actually encode the given binary to its Hex representation. More... | |
DLL_ENCRYPTOR_EXIM MDataType::Binary* MEncryptor::AddHeader | ( | const MDataType::Binary * | ipcData, |
unsigned Int32 | inVersion | ||
) |
DLL_ENCRYPTOR_EXIM EncryptorDecryptor* MEncryptor::CreateMD5EncryptorDecryptor | ( | const WCHAR * | ipcKeySeed | ) |
MD5 KeySeed factory.
ipcKeySeed is hashed into a key using MD5
DLL_ENCRYPTOR_EXIM EncryptorDecryptor* MEncryptor::CreatePDEncryptorDecryptor | ( | const WCHAR * | ipcKeySeed, |
EncryptionVersion & | irEncryptionVersion | ||
) |
Platform Dependent (PD) Encryptor/Decryptor factory.
Strong encryption algorithms (like RC4) is prohibited from some platforms. Franch is one of the platforms that we are aware of where RC4 is prohibited. As a result, a weak encryption algorithm is used in its place. But on all other platforms, we still use RC4. CreatePDEncryptorDecryptor is a factory to create an encryptor based on the locale ID. For those platforms where RC4 is prohibited, an SIMPLE encryptor is created. Otherwise, we create an RC4 encryptor (the key seed is hashed using MD5 hashing algorithm). The encryption version is carried out with parameter irEncryptionVersion.
ipcKeySeed is the key seed to create the strong encryptor irEncryptionVersion is a MEncryptor::EncryptionVersion.
DLL_ENCRYPTOR_EXIM EncryptorDecryptor* MEncryptor::CreateRIPEMD160EncryptorDecryptor | ( | const WCHAR * | ipcKeySeed | ) |
RIPEMD160 KeySeed factory.
ipcKeySeed is hashed into a key using RIPEMD160
DLL_ENCRYPTOR_EXIM EncryptorDecryptor* MEncryptor::CreateRIPEMD160EncryptorDecryptor | ( | MDataType::Binary * | ipKey | ) |
RIPEMD160 KeySeed factory.
ipcKeySeed is hashed into a key using RIPEMD160
DLL_ENCRYPTOR_EXIM EncryptorDecryptor* MEncryptor::CreateSIMPLEEncryptorDecryptor | ( | ) |
Simple Encryptor/Decryptor factory.
bool MEncryptor::ctoi | ( | unsigned char | iDigitChar, |
unsigned char & | orDigit | ||
) |
Converts a character to a number.
DLL_ENCRYPTOR_EXIM EncryptionVersion MEncryptor::GetHighestVersionMD5 | ( | ) |
Retrieve the highest encryption/decryption algorithm version for the encryptor/decryptor that uses MD5 to hash keys. The intended use is when the encryptor and the decryptor may have different versions. The decryptor can get the highest level of encyption it supports and relay that information to the encryptor. The encryptor can then down grade and encrypt the message the decryptor can decrypt.
DLL_ENCRYPTOR_EXIM EncryptionVersion MEncryptor::GetHighestVersionRIPEMD160 | ( | ) |
Retrieve the highest encryption/decryption algorithm version for the encryptor/decryptor that uses RIPEMD160 to hash keys. The intended use is when the encryptor and the decryptor may have different versions. The decryptor can get the highest level of encyption it supports and relay that information to the encryptor. The encryptor can then down grade and encrypt the message the decryptor can decrypt.
DLL_ENCRYPTOR_EXIM unsigned Int32 MEncryptor::GetVersion | ( | const WCHAR * | ipcEncodedData | ) |
Retrieve the version from the given encoded data (encoded with HexEncodeWithSignature)
ipcEncodedData | The encoded data |
DLL_ENCRYPTOR_EXIM MDataType::Binary* MEncryptor::HexDecode | ( | const WCHAR * | ipcData, |
bool | ibReverseHighLow = false |
||
) |
Decode the string encoded with HexEncode.
ipcData | is the string to be decoded |
ibReverseHighLow | indicates if the high and low part of a byte has been reversed (default is not). |
BadDataException | indicating the data is corrupted |
MDataType::Binary* MEncryptor::HexDecodeWithEncryptionLevel | ( | const WCHAR * | ipcData, |
bool | ibReverseHighLow | ||
) |
DLL_ENCRYPTOR_EXIM MDataType::Binary* MEncryptor::HexDecodeWithSignature | ( | const WCHAR * | ipcData, |
bool | ibReverseHighLow = false |
||
) |
Decode the string encoded with HexEncodeWithSignature.
ipcData | is the encoded data |
ibReverseHighLow | indicates if the high and low part of a byte has been reversed (default is not). |
BadDataException | indicating the data is corrupted |
DLL_ENCRYPTOR_EXIM MBase::ReturnWString MEncryptor::HexEncode | ( | const MDataType::Binary * | ipcData, |
bool | ibReverseHighLow = false , |
||
bool | ibUpperCase = true |
||
) |
Encode the given binary data into its Hex representation (without signature).
ipcData | is the binary data to be encoded |
ibReverseHighLow | indicates if the high and low part of a byte needs to be reversed (default is not). |
ibUpperCase | indicates whether to use upper case for the hexdecimal letters (default is upper case). |
DLL_ENCRYPTOR_EXIM MBase::ReturnWString MEncryptor::HexEncodeWithSignature | ( | const MDataType::Binary * | ipcData, |
unsigned Int32 | inVersion, | ||
bool | ibReverseHighLow = false , |
||
bool | ibUpperCase = true |
||
) |
HexEncoder contains functions that perform conversion between binary data and its Hex representation.
Encode the given binary data into its Hex representation. It also hash the binary data to generate a signature. You can also associate a version with the encoded data. The encoded data contains the version, the signature and the original data (in this order).
ipcData | is the binary data to be encoded |
inVersion | is the version that you'd like to associate with the data |
ibReverseHighLow | indicates if the high and low part of a byte needs to be reversed (default is not). |
ibUpperCase | indicates whether to use upper case for the hexdecimal letters (default is upper case). |
WCHAR* MEncryptor::hHexEncode | ( | const MDataType::Binary * | ipcBinaryData, |
bool | ibReverseHighLow = false , |
||
bool | ibUpperCase = true |
||
) |
Actually encode the given binary to its Hex representation.
WCHAR* MEncryptor::hHexEncodeWithEncryptionLevel | ( | const MDataType::Binary * | ipcData, |
unsigned int | inEncryptionLevel, | ||
unsigned int | inHashVersion, | ||
bool | ibReverseHighLow = false , |
||
bool | ibUpperCase = true |
||
) |
WCHAR* MEncryptor::hHexEncodeWithSignature | ( | const MDataType::Binary * | ipcData, |
unsigned int | inVersion, | ||
bool | ibReverseHighLow = false , |
||
bool | ibUpperCase = true |
||
) |
The actual implementation of the encoding algorithm.
DLL_ENCRYPTOR_EXIM MDataType::Binary* MEncryptor::RemoveHeader | ( | const MDataType::Binary * | ipcData | ) |