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

Home

 
4D v18.4
dataStore.encryptionStatus( )

dataStore.encryptionStatus( ) 


 

dataStore.encryptionStatus () -> Result 
Parameter Type   Description
Result  Object in Information about the encryption of the current datastore and of each table

The dataStore.encryptionStatus( ) command returns an object providing the encryption status for the current data file (i.e., the data file of the ds datastore). The status for each table is also provided.

Notes: 

  • Use the Data file encryption status command to determine the encryption status of any other data file.
  • The dataStore.encryptionStatus( ) method cannot be called from an encrypted remote datastore.

 

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 provided(*).
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 can be provided:

Example  

You want to know the number of encrypted tables in the current data file:

 C_OBJECT($status)
 
 $status:=dataStore.encryptionStatus()
 
 If($status.isEncrypted) //the database is encrypted
    C_LONGINT($vcount)
    C_TEXT($tabName)
    For each($tabName;$status.tables)
       If($status.tables[$tabName].isEncrypted)
          $vcount:=$vcount+1
       End if
    End for each
    ALERT(String($vcount)+" encrypted table(s) in this datastore.")
 Else
    ALERT("This database is not encrypted.")
 End if



See also 

4D Blog - New 4D commands to work with encrypted data
Data file encryption status

 
PROPERTIES 

Product: 4D
Theme: ORDA - DataStore

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R5

 
ARTICLE USAGE

4D Language Reference ( 4D v18)
4D Language Reference ( 4D v18.4)
4D Language Reference ( 4D v18.6)