Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2020-10-05 10:07:42

kory75
New member
Registered: 2020-10-05
Posts: 3

Encrypting All Database String(varcar/text) values

Hi,

I would need help on what class would be the best to introduce encrypting/decrypting for all string values at the db?

What I would like to achieve is all varchar/text values are encrypted in the database.

I would like to handle the encryption/decryption in the php preferably at a single point, if possible.

Could you point me towards right class/classes to do this please?

Cheers,

Kory75

Offline

#2 2020-10-05 10:12:01

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Encrypting All Database String(varcar/text) values

Hi,

If you are talking about chat and messages it would be.

lhc_web/lib/models/lhchat/erlhcoreclassmodelchat.php
lhc_web/lib/models/lhchat/erlhcoreclassmodelcannedmsg.php

These classes and trait class
/intel/git/livehelperchat_mysql/lhc_web/lib/core/lhcore/lhdbtrait.php

And you can just use beforeSave, beforeUpdate but I have no idea how you would handle loading... As there is listings etc etc.

Offline

#3 2020-10-05 10:32:02

kory75
New member
Registered: 2020-10-05
Posts: 3

Re: Encrypting All Database String(varcar/text) values

Hi remdex,

Thank you for your quick answer.
So to achieve what I need, I have to modify per model/table (only for the ones has string columns, though)

And I also need to check any listings and alter them as well.

Cheers,

kory75

Offline

#4 2020-10-05 10:51:45

kory75
New member
Registered: 2020-10-05
Posts: 3

Re: Encrypting All Database String(varcar/text) values

I was wondering if I could do it at PersistentObject level at in the get/set functions or similar.
I maybe on the wrong track though. wink

Offline

Board footer