TRIGGER for CRYPTING the PASSWORD field when INSERTING or UPDATING a new record.
Posted on 2008-10-07
Please suppose you have a table called CREDENTIALS, with two fields: USERNAME VARCHAR2(30), and PASSWORD VARCHAR2(30).
Of course I can insert new credentials when I wish to allow a new user to use our system:
INSERT INTO CREDENTIALS VALUES ('SCOTT', 'TIGER');
But the password, 'TIGER', is not encrypted, so other users - as well as DBAs - can see the password simply SELECTing the CREDENTIALS table...!! For me it is a security problem.
I would like to write a TRIGGER that, on every insert or update in the PASSWORD field, automatically encrypts the field PASSWORD.
Can you help me?