Sensitive Field Data


I need to store some sensitive data in Vendor add-ons section, so I have created a new column in companies table everything is configure and working, but how can I store encrypt data in this filed, is there a hook for this?

Thanks for any help.


If you mean database, use the fn_decrypt_text and fn_encrypt_text functions. For example, they are used for storing payment information in database

I'm actually not sure how to archive this.

Should be something like this?

$schema = array(
    'collect_data_callback' => function () {
        $company_data['ng_password_api'] = fn_decrypt_text($company_data['ng_password_api']);
    'update_data_callback' => function () {
        $company_data['ng_password_api'] = fn_encrypt_text($company_data['ng_password_api']);
return $schema;

Not sure that schema do you use. But you think in the right direction