| 4D v18Register data key | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 Register data key 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Register data key ( curPassPhrase | curDataKey ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| curPassPhrase | curDataKey | Text, Object |   | Current passphrase (text) or current data encryption key (object) | |||||
| Function result | Boolean |   | True if the encryption key has been successfully added to the 4D keychain, False if it was already in the 4D keychain | |||||
The Register data key command adds the data encryption key passed in parameter to the 4D keychain.
The 4D keychain is a set of one or more data encryption key(s) loaded in memory which 4D automatically scans when a data key is required to decrypt/encrypt a data file. For more information, please refer to Encrypting data.
In the first parameter, pass the curPassPhrase or curDataKey that defines the encryption key to add:
Returned value
 C_TEXT($passphrase)
 C_BOOLEAN($added)
 
 $passphrase:=Request("Enter the passphrase:")
 If(OK=1)
    $added:=Register data key($passphrase)
 
    OPEN DATA FILE("data.4DD") //No key required, it is in the 4D keychain
 End if
									4D Blog - New 4D commands to work with encrypted data
									
									New data key
									
	Product:  4D
	Theme:  Data Security
	Number:  
        1638
        
        
        
	
	Created:  4D v17 R5
	
	
	4D Language Reference ( 4D v18)
	
	
	
 Add a comment
Add a comment