Specify which key is used to encrypt and decrypt a text.
Encr_SetCryptKey ( switches ; the_key )
|switches||reserved for future use, leave empty or set to "-Unused"|
|the_key||the key is used to encrypt and decrypt a text|
Use this before you use the function “Encr_EncryptNewDES” or “Encr_DecryptNewDES”. The key has to be at least 6 characters long and is case sensitive.
Data type returned
0 if the key was set succesfully.
Troi Encryptor Plug-in 1.2
FileMaker Pro 14 to 17
This is an obsolete function. Please use the more secure AES functions.
Set Field [ gErrorCode ; Encr_SetCryptKey ( "-Unused" ; "mySecret" ) ] If [ gErrorCode = 0 ] Set Field [ result ; Encr_EncryptNewDES ( "-Unused" ; "Hello World" ) ] Set Field [ gErrorCode ; Encr_SetCryptKey ( "-Unused" ; "different Key" ) ] End If
gives this result: “l’ùé—JtO<=! Û¡\}0Óÿ„]˘¿Cºdè≈ˇ”
Note that after the encryption the key is set to a different one, to prevent subsequent use of it.