Skip to main content

Encr_SetCryptKey (function reference)

By April 20, 2023April 25th, 2023Online 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 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 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 16 to 2023 –> Encr_SetCryptKey (encrp4282) 2023-0425 16:00:35

troi.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping us to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.