Encr_SetCryptKey (function reference)

By February 1, 2019June 10th, 2020Online Help, Troi Encryptor Plug-in
Troi Encryptor Plug-in for FileMaker Pro

Encr_SetCryptKey

Specify which key is used to encrypt and decrypt a text.

SyntaxFunction badge

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 15 to 19

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.

Related functionsFunction badge

Encr_Code
Encr_DecryptNewDES
Encr_EncryptNewDES

Related topics

Troi Encryptor Plug-in online help (overview)


Online Help Page for Troi Encryptor Plug-in for 15 to 19 –> Encr_SetCryptKey (encrp4282) 2020-0610 16:27:31