delight-im / PHP-Auth

Authentication for PHP. Simple, lightweight and secure.
MIT License
1.08k stars 234 forks source link

Encryption of PII #298

Open GamerMedic opened 9 months ago

GamerMedic commented 9 months ago

Is it possible to encrypt the email address for users? I've got encryption already set up, the problem is that I get an invalid email address error when passing the encrypted form (obviously).

The data needs encrypting to comply with data protection regulations, so is there a way to bypass the email validation (instead handling validation myself)? Or to be able to encrypt data after PHP-Auth validates it?

kennyrkun commented 5 months ago

Perhaps it would be useful to have functions which can be used to modify data before it comes out of the database, and which similarly modify it before it goes into the database. That way, the database could store the data encrypted, and unencrypt it as it comes out and needs to be worked on.