4D v19dataStore.encryptionStatus( ) |
|||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
dataStore.encryptionStatus( )
|
||||||||||||||||||||||||||||||||||||||||||||||
| Property | Type | Description | ||
| isEncrypted | Boolean | True if the data file is encrypted | ||
| keyProvided | Boolean | True if the encryption key matching the encrypted data file is provided(*). | ||
| tables | Object | Object containing as many properties as there are encryptable or encrypted tables. | ||
| <table name> | Object | Encryptable or Encrypted table | ||
| name | Text | Name of the table | ||
| num | Number | Table number | ||
| isEncryptable | Boolean | True if the table is declared encryptable in the structure file | ||
| isEncrypted | Boolean | True if the records of the table are encrypted in the data file |
(*) The encryption key can be provided:
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
4D Blog - New 4D commands to work with encrypted data
Data file encryption status
Product: 4D
Theme: ORDA - DataStore
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
Add a comment