IMVCrypt
IMVCrypt Interface.
The MV Network Renderer Filter and MV Network Source Filter implements this interface. The Interface returns some information about received network data.
| Algorithm | Get encryption algorithm |
| CreateKey | Creates a key. |
| CreateKeyfile | Creates a key file. |
| Enable | Enable Encryption/Decryption. |
| GetKey | Get the key. |
| KeyFilePath | Get the key file path |
| KeyLength | Get encryption key length in bytes |
| Mode | Get encryption mode |
| OpenKeyfile | Open a key file and load the key. |
| Padding | Get padding mode |
| SetKey | Set the key. |
| UseKeyFile | Get the "Use Keyfile" flag |
Header file: IMVCrypt.h
Interface definition language file: IMVCrypt.idl
Typelib: MVCrypt
Interface ID: IID_IMVCrypt
Declaration: Property Get/Put Algorithm As Long
Get encryption/decryption algorithm.
Prototype:
Algorithm Value Description MV_CRYPTO_ALGORITHM_AES 0 AES (Rijndael) MV_CRYPTO_ALGORITHM_BLOWFISH 1 Blowfish MV_CRYPTO_ALGORITHM_TEA 2 Tea HRESULT put_Algorithm(int value);
HRESULT get_Algorithm(int value);
Declaration: Sub CreateKeyCreates a new key with the current settings.
Prototype:HRESULT CreateKey();
Method IMVCrypt::CreateKeyfile
Declaration: Sub CreateKeyfile(path As String)Creates a new key with the current settings and saves the key into a keyfile.
Parameter:
Prototype:
path Path for the new keyfile. HRESULT CreateKeyfile(STRING path);
Declaration: Property Get/Put Enable As LongEnable Encryption/Decryption.
Prototype:HRESULT put_Enable(int value);
HRESULT get_Enable(int* value);
Declaration: Sub GetKey(maxLength As Long, length As Long, key As Byte)Copies the current key into an array. Use the MAX_KEY_LENGTH (=1024) definition to create the array.
Parameter:
Prototype:
maxLength Size of the array from the key parameter length Contains the current key size after return. key Array for the current key. HRESULT GetKey(int maxLength, int* length, byte* key);
Property IMVCrypt::KeyFilePath
Declaration: Property Get/Put KeyFilePath As StringGet/Set the keyfile path.
Prototype:HRESULT put_KeyFilePath(BSTR value);
HRESULT get_KeyFilePath(BSTR* value);
Declaration: Property Get/Put KeyLength As LongGet encryption key length in bytes
Prototype:HRESULT put_KeyLength(int* value);
HRESULT get_KeyLength(int* value);
Declaration: Property Get/Put Mode As LongGet encryption mode.
Mode Value Description MV_CRYPTO_MODE_ECB 0 Electronic Code Book MV_CRYPTO_MODE_CBC 1 Cipher Block Chaining MV_CRYPTO_MODE_CFB 2 Cipher Feedback Block Prototype:
HRESULT put_Mode(int value);
HRESULT get_Mode(int* value);
Declaration: Sub OpenKeyfile(path As String)Open a keyfile and load the key.
Parameter:
Prototype:
path Path to the keyfile. HRESULT OpenKeyfile(BSTR path);
Declaration: Property Get/Put Padding As LongGet padding mode
Prototype:
Mode Value Description MV_CRYPTO_PADDING_ZEROS 0 Padding with zero values. MV_CRYPTO_PADDING_BLANKS 1 Padding wuth blanks. MV_CRYPTO_PADDING_PKCS7 2 Padding according to PKCS7 HRESULT put_Padding(int value);
HRESULT get_Padding(int* value);
Declaration: Sub SetKey(length As Long, key As Byte)Set the key.
Parameter:
Prototype:
length Legth of the new key in bytes. key Array of length size with the new key. HRESULT SetKey(LONG length, BYTE key);
Declaration: Property Get/Put UseKeyFile As LongGet the "Use Keyfile" flag.
Prototype:HRESULT put_UseKeyFile(int* value);
HRESULT put_UseKeyFile(int* value);