Page 1 of 1

Encryption advice

Posted: 2015-02-04 22:23
by DrKnow
Hi Ahmed and others...

I see you say we can use hooks to encrypt and decrypt data.

I would like your advice on this. What have you done if I may ask to encrypt data? Many of us have asked for this feature and I can understand why you don't want to include it as it is after all a complete subject on its own, but your help and input would be appreciated.

If I understand the logic:
data is held in the database as encrypted using standard ASCII->before being read and written to it passes through a hook set of commands/routine and presents the user with the decrypted data...

Won't this cause excessive processing?

Thanks
DrKnow

Re: Encryption advice

Posted: 2015-02-05 23:40
by a.gneady
Yep ... your guess is correct. Encryption works by encrypting data before storing it into the database (through the before_insert and before_update hooks), and decrypted (using the init hook) before reading it. This might indeed require a lot of processing. So, if the application you're writing requires that level of security (for example to encrypt credit card data, or for a banking application .. etc), you'd need to use a server with enough processing power to handle the load.