Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

AES with PHP

All examples are included with download of MBS FileMaker Plugin.

AES with PHP.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
AES like PHP
8 fields defined, 1 record
AES like PHP

Fields

Table Name: AES like PHP - 8 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
keyPlainTextNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      ivPlainTextNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          dataPlaintextNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              algorithmNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  keyHashNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      IVNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          EncryptedDataNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              DecryptedDataNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German

                                  Layout Objects: AES like PHP

                                  Regular Fields

                                  Field Name: AES like PHP::keyPlainText
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 24 pt
                                  • Left: 138 pt
                                  • Bottom: 38 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Field Format:
                                  • Edit Box
                                  Field Behavior:
                                  • Allow field to be entered: In Find mode, In Browse mode
                                  • Touch keyboard type: System Default
                                  • Go to next field using: Tab key
                                  Yes

                                  Field Name: AES like PHP::ivPlainText
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 42 pt
                                  • Left: 138 pt
                                  • Bottom: 56 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Field Format:
                                  • Edit Box
                                  Field Behavior:
                                  • Allow field to be entered: In Find mode, In Browse mode
                                  • Touch keyboard type: System Default
                                  • Go to next field using: Tab key
                                  Yes

                                  Field Name: AES like PHP::dataPlaintext
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 60 pt
                                  • Left: 138 pt
                                  • Bottom: 74 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Field Format:
                                  • Edit Box
                                  Field Behavior:
                                  • Allow field to be entered: In Find mode, In Browse mode
                                  • Touch keyboard type: System Default
                                  • Go to next field using: Tab key
                                  Yes

                                  Field Name: AES like PHP::algorithm
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 78 pt
                                  • Left: 138 pt
                                  • Bottom: 92 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Field Format:
                                  • Edit Box
                                  Field Behavior:
                                  • Allow field to be entered: In Find mode, In Browse mode
                                  • Touch keyboard type: System Default
                                  • Go to next field using: Tab key
                                  Yes

                                  Field Name: AES like PHP::keyHash
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 144 pt
                                  • Left: 138 pt
                                  • Bottom: 158 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Field Format:
                                  • Edit Box
                                  Field Behavior:
                                  • Allow field to be entered: In Find mode, In Browse mode
                                  • Touch keyboard type: System Default
                                  • Go to next field using: Tab key
                                  Yes

                                  Field Name: AES like PHP::IV
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 162 pt
                                  • Left: 138 pt
                                  • Bottom: 176 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Field Format:
                                  • Edit Box
                                  Field Behavior:
                                  • Allow field to be entered: In Find mode, In Browse mode
                                  • Touch keyboard type: System Default
                                  • Go to next field using: Tab key
                                  Yes

                                  Field Name: AES like PHP::EncryptedData
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 180 pt
                                  • Left: 138 pt
                                  • Bottom: 194 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Field Format:
                                  • Edit Box
                                  Field Behavior:
                                  • Allow field to be entered: In Find mode, In Browse mode
                                  • Touch keyboard type: System Default
                                  • Go to next field using: Tab key
                                  Yes

                                  Field Name: AES like PHP::DecryptedData
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 198 pt
                                  • Left: 138 pt
                                  • Bottom: 212 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Field Format:
                                  • Edit Box
                                  Field Behavior:
                                  • Allow field to be entered: In Find mode, In Browse mode
                                  • Touch keyboard type: System Default
                                  • Go to next field using: Tab key
                                  Yes

                                  Group Buttons

                                  Button PropertiesCoordinatesScript/Script Step
                                    Type:
                                  • Text: Encrypt & Decrypt
                                    Additional Properties:
                                  • Change to hand cursor over button
                                  • Rectangular
                                  • Top: 102 pt
                                  • Left: 270 pt
                                  • Bottom: 127 pt
                                  • Right: 391 pt
                                  • Anchoring: Left, Top
                                  Perform Script [ “Run” ]

                                  Scripts:


                                  Script Hierarchy

                                  Run
                                  Clear

                                  Next Script: [Clear]
                                  Script NameRun
                                  Run script with full access privilegesOff
                                  Include In MenuYes
                                  Layouts that use this script
                                  Scripts that use this script
                                    Script Definition
                                    Script Steps
                                    • # prepare
                                    • Set Variable [ $keyHash; Value:MBS( "Hash.Digest"; "SHA256"; "Text"; AES like PHP::keyPlainText; "UTF-8"; "hex") ]
                                    • Set Field [ AES like PHP::keyHash; $keyHash ]
                                    • Set Variable [ $IVHash; Value:MBS( "Hash.Digest"; "SHA256"; "Text";AES like PHP::ivPlainText; "UTF-8"; "hex") ]
                                    • Set Variable [ $IVHash; Value:Left($IVHash; 32) ]
                                    • Set Field [ AES like PHP::IV; $IVHash ]
                                    • # encrypt
                                    • Set Field [ AES like PHP::EncryptedData; MBS( "Encryption.Cipher"; "encrypt"; AES like PHP::algorithm; "hex"; AES like PHP::keyHash; ""; "text"; AES like PHP::dataPlaintext; "UTF-8"; "base64"; ""; "hex"; AES like PHP::IV ) ]
                                    • # decrypt
                                    • Set Field [ AES like PHP::DecryptedData; MBS( "Encryption.Cipher"; "decrypt"; AES like PHP::algorithm; "hex"; AES like PHP::keyHash; ""; "base64"; AES like PHP::EncryptedData; ""; "text"; "UTF-8"; "hex"; AES like PHP::IV; "" ) ]
                                    Fields used in this script
                                    Scripts used in this script
                                      Layouts used in this script
                                        Tables used in this script
                                        Table occurrences used by this script
                                        Custom Functions used by this script
                                          Custom menu set used by this script

                                            Previous Script: [Run]
                                            Script NameClear
                                            Run script with full access privilegesOff
                                            Include In MenuYes
                                            Layouts that use this script
                                              Scripts that use this script
                                                Script Definition
                                                Script Steps
                                                • Set Field [ AES like PHP::keyHash; "" ]
                                                • Set Field [ AES like PHP::IV; "" ]
                                                • Set Field [ AES like PHP::EncryptedData; "" ]
                                                • Set Field [ AES like PHP::DecryptedData; "" ]
                                                Fields used in this script
                                                Scripts used in this script
                                                  Layouts used in this script
                                                    Tables used in this script
                                                    Table occurrences used by this script
                                                    Custom Functions used by this script
                                                      Custom menu set used by this script

                                                        Download example: AES with PHP

                                                        Used functions: