Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Data masking or scrambling

Sid_ Z.Jan 22 2021

Hi All,

Oracle version 12c

Can we have the "Format preserving encryption" in oracle? I have just gone through DBMS_CRYPTO package but couldn't find what I was looking for. I am looking for masking the input as follows:

How can we mask the input string and keep the length of the output string same as input string and whenever we pass the same string the output must be same.

Rolex ==> Spelt

Las Vegas ==> Pat Giokj

House number 45 ==> Lyune buytrn 87

Rolex ==> Spelt

I have done following to generate hash but it is not as expected:

select RAWTOHEX(DBMS_CRYPTO.hash(UTL_I18N.STRING_TO_RAW('Rolex','AL32UTF8') ,2) )

from DUAL;

o/p => 495B086776E9EFCCC306E291F4948925

Any suggestion
Regards,
Sid

Comments
Post Details
Added on Jan 22 2021
4 comments
615 views