Encr_SetCryptKey (function reference)

By February 1, 2019 February 12th, 2019 Online 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

switchesreserved for future use, leave empty or set to "-Unused"
the_keythe 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 14 to 17

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 14 to 17 –> Encr_SetCryptKey (encrp4282) 2019-0212 17:30:28