Enumerations | |
enum | DigitalRightsEncryptionPermissions { DIGITAL_RIGHTS_ENCRYPTION_PERMISSIONS_None =0, DIGITAL_RIGHTS_ENCRYPTION_PERMISSIONS_Password =1, DIGITAL_RIGHTS_ENCRYPTION_PERMISSIONS_Certificate =2, DIGITAL_RIGHTS_ENCRYPTION_PERMISSIONS_Everyone =4, DIGITAL_RIGHTS_ENCRYPTION_PERMISSIONS_Any =(DIGITAL_RIGHTS_ENCRYPTION_PERMISSIONS_Password|DIGITAL_RIGHTS_ENCRYPTION_PERMISSIONS_Certificate|DIGITAL_RIGHTS_ENCRYPTION_PERMISSIONS_Everyone) } |
Values returned by digitalRights_getEncryptionPermissions and digitalRights_getLicenseAddPermissions. More... | |
Functions | |
StatusInt | mdlDgnFileObj_checkRights (DgnFileP dgnFileObj, UInt32 rights, MessageDestination displayError) |
Check if the specified rights are granted to the current user for the specified file. More... | |
bool | mdlDgnFileObj_isProtected (DgnFileP file) |
Check if the specified file is encrypted (e.g., for digital rights management) More... | |
DgnFileSupplyRightsP | mdlDgnFileObj_getReloadContext (DgnFileP file) |
Get the "context" needed to reopen this file using the same password or other credentials used to open it previously. More... | |
void | mdlDgnFileObj_freeReloadContext (DgnFileSupplyRightsP *pContext) |
Free the "context" returned by mdlDgnFileObj_getReloadContext. More... | |
StatusInt | digitalRights_encryptFile (DgnFileP file, byte const *keyMaterial, ULong32 nkeyMaterial, int iterations) |
AssigningGraphicGroup Assigning a Group Group to Members of Selection Set More... | |
DigitalRightsEncryptionPermissions | digitalRights_getEncryptionPermissions (DgnFileP file) |
Check to see if the current user is allowed to encrypt the file. More... | |
DigitalRightsEncryptionPermissions | digitalRights_getLicenseAddPermissions (DgnFileP file) |
Check to see what type of licenses, if any, the the current user is allowed to create. More... | |
DgnFileSupplyRightsP | digitalRights_createLoadContext (byte const *keyMaterial, ULong32 nkeyMaterial) |
Create a load context that can be passed into functions such as mdlWorkDgn_openFileWithRights in order to open a protected file. More... | |
void | digitalRights_freeLoadContext (DgnFileSupplyRightsP *ppContext) |
free the pointer returned by digitalRights_createLoadContext More... | |
bool | digitalRights_inRestrictedMode (MessageDestination displayError) |
Check if we are in restricted mode, i.e., where only authorized apps can run. More... | |
StatusInt | digitalRights_checkRights (UInt32 rights, MessageDestination displayError) |
Check if the current user has been granted the specified rights to all of the currently open design files. More... | |
StatusInt | digitalRights_scramblePassword (ScrambledPasswordP pw, byte const *rawPw, ULong32 rawPwChars) |
Run the raw password through a one-way transformation, producing a scrambled password. More... | |
DgnFileSupplyRightsP | digitalRights_createCertificateLoadContext (DsigCertificateCP cert) |
Create a context that can be used to open a protected file using a certificate-based license. More... | |
DgnFileSupplyRightsP | digitalRights_createPasswordLoadContext (ScrambledPasswordCP pw) |
Create a context that can be used to open a protected file using a password-based license. More... | |
DgnFileSupplyRightsP | digitalRights_createPasswordPromptLoadContext () |
Create a context that can be used to open a protected file using a password-based license. More... | |
void | digitalRights_deleteLoadContext (DgnFileSupplyRightsP context) |
Free a context returned by digitalRights_createPasswordLoadContext. More... | |
int | mdlSystem_getSecurityLevel () |
Query the setting for MS_SECURITY_LEVEL. More... | |
Values returned by digitalRights_getEncryptionPermissions and digitalRights_getLicenseAddPermissions.
StatusInt digitalRights_checkRights | ( | UInt32 | rights, |
MessageDestination | displayError | ||
) |
Check if the current user has been granted the specified rights to all of the currently open design files.
[in] | rights | the rights to check. Use the DgnPlatform::DGNFILE_RIGHT_... constants to specify the rights you want to check. |
[in] | displayError | for no message, pass MESSAGE_DEST_None; else MESSAGE_DEST_WarningDialog or MESSAGE_DEST_MessageCenter. |
DgnFileSupplyRightsP digitalRights_createCertificateLoadContext | ( | DsigCertificateCP | cert | ) |
Create a context that can be used to open a protected file using a certificate-based license.
[in] | cert | A copy of the ceritificate to use |
DgnFileSupplyRightsP digitalRights_createLoadContext | ( | byte const * | keyMaterial, |
ULong32 | nkeyMaterial | ||
) |
Create a load context that can be passed into functions such as mdlWorkDgn_openFileWithRights in order to open a protected file.
[in] | keyMaterial | the bytes to use to generate the encryption key. |
[in] | nkeyMaterial | the number of bytes in keyMaterial. |
DgnFileSupplyRightsP digitalRights_createPasswordLoadContext | ( | ScrambledPasswordCP | pw | ) |
Create a context that can be used to open a protected file using a password-based license.
The password is supplied by the caller.
[in] | pw | The password to use, in scrambled form |
DgnFileSupplyRightsP digitalRights_createPasswordPromptLoadContext | ( | ) |
Create a context that can be used to open a protected file using a password-based license.
MicroStation prompts the user for the password
void digitalRights_deleteLoadContext | ( | DgnFileSupplyRightsP | context | ) |
Free a context returned by digitalRights_createPasswordLoadContext.
[in] | context | The context object to destroy |
StatusInt digitalRights_encryptFile | ( | DgnFileP | file, |
byte const * | keyMaterial, | ||
ULong32 | nkeyMaterial, | ||
int | iterations | ||
) |
AssigningGraphicGroup Assigning a Group Group to Members of Selection Set
[in] | file | the file to be encrypted. Must be open read-write. |
[in] | keyMaterial | the bytes to use to generate the encryption key. |
[in] | nkeyMaterial | the number of bytes in keyMaterial. |
[in] | iterations | the number of PBKDF1 iterations to apply when generating the key from the key. Pass 0 if keyMaterial is composed of random bytes and cannot be guessed. Otherwise, a value of 1000 is recommended. |
void digitalRights_freeLoadContext | ( | DgnFileSupplyRightsP * | ppContext | ) |
free the pointer returned by digitalRights_createLoadContext
[in] | ppContext | pointer to variable that holds the pointer. Set to NULL on return. |
DigitalRightsEncryptionPermissions digitalRights_getEncryptionPermissions | ( | DgnFileP | file | ) |
Check to see if the current user is allowed to encrypt the file.
Check what kind of encryption is permitted.
[in] | file | the file to be encrypted |
DigitalRightsEncryptionPermissions digitalRights_getLicenseAddPermissions | ( | DgnFileP | file | ) |
Check to see what type of licenses, if any, the the current user is allowed to create.
[in] | file | the encrypted file to be modified |
bool digitalRights_inRestrictedMode | ( | MessageDestination | displayError | ) |
Check if we are in restricted mode, i.e., where only authorized apps can run.
If so, optionally identify and report the design files that have restricted access.
[in] | displayError | for no message, pass MESSAGE_DEST_None; else MESSAGE_DEST_WarningDialog or MESSAGE_DEST_MessageCenter. |
StatusInt digitalRights_scramblePassword | ( | ScrambledPasswordP | pw, |
byte const * | rawPw, | ||
ULong32 | rawPwChars | ||
) |
Run the raw password through a one-way transformation, producing a scrambled password.
[out] | pw | scrambled password |
[in] | rawPw | raw password bytes to be scrambled |
[in] | rawPwChars | number of bytes of material to be scrambled |
StatusInt mdlDgnFileObj_checkRights | ( | DgnFileP | dgnFileObj, |
UInt32 | rights, | ||
MessageDestination | displayError | ||
) |
Check if the specified rights are granted to the current user for the specified file.
[in] | dgnFileObj | the DgnFileObj of interest. |
[in] | rights | the rights to query |
[in] | displayError | display error message in message center if rights not granted? Else return ERROR silently |
void mdlDgnFileObj_freeReloadContext | ( | DgnFileSupplyRightsP * | pContext | ) |
Free the "context" returned by mdlDgnFileObj_getReloadContext.
[in,out] | pContext | pointer to opaque reload context ptr to be freed |
DgnFileSupplyRightsP mdlDgnFileObj_getReloadContext | ( | DgnFileP | file | ) |
Get the "context" needed to reopen this file using the same password or other credentials used to open it previously.
You can pass this opaque pointer into functions such as mdlWorkDgn_openFileWithRights.
[in] | file | a currently open file to be closed and reopened later |
bool mdlDgnFileObj_isProtected | ( | DgnFileP | file | ) |
Check if the specified file is encrypted (e.g., for digital rights management)
[in] | file | the DgnFileObj of interest. |
int mdlSystem_getSecurityLevel | ( | ) |
Query the setting for MS_SECURITY_LEVEL.