Skip to main content

Encr_GetPasswordFromKeychain (function reference)

By August 1, 2021August 19th, 2021Online Help, Troi Encryptor Plug-in
Troi Encryptor Plug-in > Functions reference > Encr_GetPasswordFromKeychain
Troi Encryptor Plug-in for FileMaker Pro


Gets a password from the keychain (for this account and/or yourID).

SyntaxFunction badge

Encr_GetPasswordFromKeychain ( switches ; account { ; yourID } )


switches not used, reserved for future use. Leave blank or put "-Unused"
account the name of the account (or user) that has been used when saving this password
yourID (optional) the extra ID that was used when saving this password

Returned Result

Data type returned



The saved password or an error code.

Returned error codes can be:

$$-25300 the password could not be found in the keychain
$$-50 Parameter error

Originated in

Troi Encryptor Plug-in 3.5


FileMaker Pro 16 to 19


The password is safely stored in the keychain and it can be retrieved from the keychain with this function without the user needing to enter the (keychain) password. The keychain is unlocked when the user logs in to the operating system.

If you specify an account and/or yourID combination for which no password exists, the plug-in returns error code $$-25300.


Set Variable [ $Password ; Encr_GetPasswordFromKeychain ( "-Unused" ; "John Deere" ) ]

This will get the password for the user “John Deere” from the keychain, and the result will be for example “secret”.

Example 2

Set Variable [ $Password ; Encr_GetPasswordFromKeychain ( "-Unused" ; 
			"Sales" ; "Invoices|Notes|REC1001" ) ]

This will get the password from the keychain which was previously stored with the Encr_SavePasswordToKeychain function and the account parameter “Sales” and the yourID parameter “Invoices|Notes|REC1001”.
You can now use this returned password to decrypt text in a field, for example with the Encr_DecryptAES function.

Used in example file


Related functionsFunction badge


Related script stepScript step badge

Get Password from Keychain

Related topics

Troi Encryptor Plug-in online help (overview)

Online Help Page for Troi Encryptor Plug-in for 16 to 19 –> Encr_GetPasswordFromKeychain (encrp4324) 2021-0819 14:09:41