This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
Data file encryption status

Data file encryption status 


 

Data file encryption status ( structurePath , dataPath ) -> Function result 
Parameter Type   Description
structurePath  Text in Pathname of 4D structure file to be checked
dataPath  Text in Pathname of 4D data file to be checked
Function result  Object in Information about the encryption of the data file and of each table

The Data file encryption status command returns an object providing the encryption status for the data file designated by the structurePath and dataPath parameters. The status for each table is also provided.

dataPath designates a 4D data file (.4dd). It must correspond to the structure file defined by the structurePath parameter. You can designate the current structure file but the data file must not be the current (open) file.

Note: Use the ds.encryptionStatus( ) method to determine the encryption status of the current data file.

 

Returned value

The returned object contains the following properties:

PropertyTypeDescription
isEncryptedBooleanTrue if the data file is encrypted
keyProvidedBooleanTrue if the encryption key matching the encrypted data file is in the 4D keychain(*).
tablesObjectObject containing as many properties as there are encryptable or encrypted tables.
<table name>ObjectEncryptable or Encrypted table
nameTextName of the table
numNumberTable number
isEncryptableBooleanTrue if the table is declared encryptable in the structure file
isEncryptedBooleanTrue if the records of the table are encrypted in the data file

(*) The encryption key may have been provided:

Example  

You want to know the encryption status of a data file that corresponds to the current structure file:

 C_OBJECT($status)
 
 $status:=Data file encryption status(Structure file;"D:\\Invoices\\Data_2019\\Invoices.4dd")
 Case of
    :(Not($status.isEncrypted))
       ALERT("The data file is not encrypted")
    :($status.isEncrypted&(Not($status.keyProvided))
       ALERT("The data file is encrypted and the encryption key is not in the keychain. You will not have access to encrypted data.")
    :($status.isEncrypted&$status.keyProvided)
       ALERT("The data file is encrypted and the encryption key is in the keychain. You will have access to encrypted data.")
 End case



See also 

4D Blog - New 4D commands to work with encrypted data
Encrypt data file

 
PROPERTIES 

Product: 4D
Theme: Data Security
Number: 1609

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R5

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)