Encr_SetCryptKey |
Specify which key is used to encrypt and decrypt a text.
Syntax
Encr_SetCryptKey ( switches ; the_key )
Parameters
switches | reserved for future use, leave empty or set to "-Unused" |
the_key | the key is used to encrypt and decrypt a text |
Switches
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.
Returned Result
Data type returned
Error code
Result
0 if the key was set succesfully.
Originated in
Troi Encryptor Plug-in 1.2
Compatibility
FileMaker Pro 16 to FileMaker Pro 2023
Considerations
This is an obsolete function. Please use the more secure AES functions.
Example
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.
Used in example file
EncryptNewDES.fmp12
Related functions
Encr_Code |
Encr_DecryptNewDES |
Encr_EncryptNewDES |
Related topics
Troi Encryptor Plug-in online help (overview)