openGauss
开源数据库
openGauss社区官网
开源社区
openGauss预置的脱敏函数
2022-05-14openGauss社区开发入门
预置的脱敏函数
脱敏函数名 | 示例 |
---|---|
creditcardmasking | ‘4880-9898-4545-2525’ 将会被脱敏为 ‘xxxx-xxxx-xxxx-2525’,该函数仅对后 4 位之前的数字进行脱敏 |
basicemailmasking | ‘abcd@gmail.com’ 将会被脱敏为’xxxx@gmail.com’, 对出现第一个’@’之前的文本进行脱敏 |
fullemailmasking | ‘abcd@gmail.com’ 将会被脱敏为 ‘xxxx@xxxxx.com’,对出现最后一个’.’之前的文本(除’@’符外)进行脱敏 |
alldigitsmasking | ‘alex123alex’ 将会被脱敏为 ‘alex000alex’, 仅对文本中的数字进行脱敏 |
shufflemasking | ‘hello word’ 将会被随机打乱顺序脱敏为 ‘hlwoeor dl’, 该函数通过字符乱序排列的方式实现,属于弱脱敏函数,语义较强的字符串不建议使用该函数脱敏。 |
randommasking | ‘hello word’ 将会被脱敏为 ‘ad5f5ghdf5’,将文本按字符随机脱敏 |
maskall | ‘4880-9898-4545-2525’ 将会被脱敏为 ‘xxxxxxxxxxxxxxxxxxx’ |