Virtru SDK for C++  2.8.0
Virtru C++ SDK library - Create, Read, and Manage TDF3 Files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
virtru_encrypt_file_params_c.h File Reference

Go to the source code of this file.

Functions

DLL_PUBLIC VEncryptFileParamsPtr VEncryptFileParamsCreate1 (const char *inFilePath)
 
DLL_PUBLIC VEncryptFileParamsPtr VEncryptFileParamsCreate2 (const char *inFilePath, const char *outFilePath)
 
DLL_PUBLIC void VEncryptFileParamsDestroy (VEncryptFileParamsPtr vEncryptFileParamsPtr)
 
DLL_PUBLIC VSTATUS VEncryptFileParamsSetMimeType (VEncryptFileParamsPtr vEncryptFileParamsPtr, const char *mimeType)
 
DLL_PUBLIC VSTATUS VEncryptFileParamsSetPolicy (VEncryptFileParamsPtr vEncryptFileParamsPtr, VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VEncryptFileParamsSetDisplayName (VEncryptFileParamsPtr vEncryptFileParamsPtr, const char *displayName)
 
DLL_PUBLIC VSTATUS VEncryptFileParamsSetDisplayMessage (VEncryptFileParamsPtr vEncryptFileParamsPtr, const char *displayMessage)
 
DLL_PUBLIC VSTATUS VEncryptFileParamsShareWithUsers (VEncryptFileParamsPtr vEncryptFileParamsPtr, const char **users, unsigned int usersCount)
 

Function Documentation

DLL_PUBLIC VEncryptFileParamsPtr VEncryptFileParamsCreate1 ( const char *  inFilePath)

Create a new encrypt file param opaque object. NOTE: The out file path will have .html/.tdf extension appended to inFilePath based on protocol.

Parameters
inFilePath- The file on which the encryption is performed
Returns
VEncryptFileParams opaque object. NOTE: On failure returns NULL ptr.
DLL_PUBLIC VEncryptFileParamsPtr VEncryptFileParamsCreate2 ( const char *  inFilePath,
const char *  outFilePath 
)

Create a new encrypt file param opaque object.

Parameters
inFilePath- The file on which the encryption is performed
outFilePath- The file path of the tdf after successful encryption
Returns
VEncryptFileParams opaque object. NOTE: On failure returns NULL ptr.
DLL_PUBLIC void VEncryptFileParamsDestroy ( VEncryptFileParamsPtr  vEncryptFileParamsPtr)

Destruct the EncryptFileParams instance.

Parameters
vEncryptFileParamsPtr- The pointer to EncryptFileParams opaque object.
DLL_PUBLIC VSTATUS VEncryptFileParamsSetDisplayMessage ( VEncryptFileParamsPtr  vEncryptFileParamsPtr,
const char *  displayMessage 
)

Set the display message for the tdf, this message shows up on the Virtru dashboard

Parameters
vEncryptFileParamsPtr- The pointer to EncryptFileParams opaque object.
displayMessage- The display message for the tdf, null terminated string.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEncryptFileParamsSetDisplayName ( VEncryptFileParamsPtr  vEncryptFileParamsPtr,
const char *  displayName 
)

Set the display name for the tdf, this name shows up on the Virtru dashboard NOTE: If not set, the basename of inFilePath will be used

Parameters
vEncryptFileParamsPtr- The pointer to EncryptFileParams opaque object.
displayName- The display name for the tdf, null terminated string.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEncryptFileParamsSetMimeType ( VEncryptFileParamsPtr  vEncryptFileParamsPtr,
const char *  mimeType 
)

The below methods are optional, if not specified the defaults are used.Set the mime type (format) of the file that will be encrypted NOTE: The default will be 'application/octet-stream' if not specified

Parameters
vEncryptFileParamsPtr- The pointer to EncryptFileParams opaque object.
mimeType- The mime type of the file, null terminated string.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEncryptFileParamsSetPolicy ( VEncryptFileParamsPtr  vEncryptFileParamsPtr,
VPolicyPtr  vPolicyPtr 
)

Set the policy that to be applied to the tdf NOTE: If there is no policy defined for the tdf, default policy settings will be applied

Parameters
vEncryptFileParamsPtr- The pointer to EncryptFileParams opaque object.
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEncryptFileParamsShareWithUsers ( VEncryptFileParamsPtr  vEncryptFileParamsPtr,
const char **  users,
unsigned int  usersCount 
)

Add access to the TDF file/data for the users in the list

Parameters
vEncryptFileParamsPtr- The pointer to EncryptFileParams opaque object.
users- Share the TDF with the users in the users array
usersCount- Total user count in the array.
Returns
VSTATUS - VSTATUS_SUCCESS on success