Karl007
0 pts. | Apr 7 2005 10:13AM GMT
I would put the “clear data” in the *AFTER* buffer instead of putting it in the *BEFORE* buffer. (just guessing though)
On the other hand, I’m wondering what a database encripted field would be good for if you have a read trigger that unveals the original data anyway? Wouldn’t this mean that anyone who takes a look at your file using ODBC or SQL or whatever, would see what’s behind the encripted field? So what use would the encription have then? Except of course if your trigger will decript only if certain job environment conditions are met…
BigKat
2540 pts. | Oct 22 2009 2:42PM GMT
At a previous employer, they had this working where the trigger decrypted the data to the program on reads and encrypted it on writes and updates. The trigger also looked at the calling program and the userid to determine if it should decrypt. They had 2 fields in the file for each encrypted field. encrypted and clear. The clear field was always empty in the database. The trigger (if proper program and user) populated the clear field upon read (after). The user maintained the clear field (they never directly saw the encrypted field on the screens) and upon the write or update (before), the trigger encrypted the clear field into the encrypted field and cleared the clear field (for proper user and program). For non-proper user or program, the clear field was always made clear on read or write/update and the encrypted field was always set to the before image on write/update. Only a director or two had authority to the file that contained authorized users.






