Decryption of content in Mate

Discuss MySQL Ajax Table Editor

Decryption of content in Mate

Postby domgym » Thu Oct 22, 2020 8:26 am

Hello to all,

In my Mysql database I have some data that I encrypted for privacy reasons.

But I want to be able to see the decrypted data with MATE in order to edit it.

Code: Select all
$tableColumns['sensitive_data'] = array(
         'display_text' => 'Sensitive Data',
         'perms' => 'EVTAXQSFHO',
            'table_fun' => array(&$this,'textDecrypt')
      );


And here is the code of the function (just before "protected function initiateEditor()" )

Code: Select all
    function textDecrypt($col,$val,$row)
    {
        $html = '';
        if (isset($val) && strlen($val) > 0)
        {
            $html = $cryptor->decrypt($val);
        }
        return $html;
    }


The problem is I get this error :
Invalid json sent back from server. Error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Server sent: Fatal error: Uncaught Error: Call to a member function decrypt() on null


Does someone understands why ?

--
domgym
 
Posts: 1
Joined: Thu Oct 22, 2020 8:17 am

Return to Open Discussion

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron