diff --git a/src/test/java/com/lzhpo/sensitive/test/entity/SensitiveEntity.java b/src/test/java/com/lzhpo/sensitive/test/entity/SensitiveEntity.java index 1a413e8..71fc179 100644 --- a/src/test/java/com/lzhpo/sensitive/test/entity/SensitiveEntity.java +++ b/src/test/java/com/lzhpo/sensitive/test/entity/SensitiveEntity.java @@ -62,6 +62,21 @@ public class SensitiveEntity { @Sensitive(strategy = SensitiveStrategy.BANK_CARD) private String bankCard; + @Sensitive(strategy = SensitiveStrategy.IPV4) + private String ipv4; + + @Sensitive(strategy = SensitiveStrategy.IPV6) + private String ipv6; + + @Sensitive(strategy = SensitiveStrategy.FIRST_MASK) + private String firstMask; + + @Sensitive(strategy = SensitiveStrategy.CLEAR_TO_NULL) + private String clearToNull; + + @Sensitive(strategy = SensitiveStrategy.CLEAR_TO_EMPTY) + private String clearToEmpty; + @Sensitive(strategy = SensitiveStrategy.CUSTOMIZE_KEEP_LENGTH) @SensitiveKeepLength(preKeep = 1, postKeep = 1) private String keepLength1; diff --git a/src/test/java/com/lzhpo/sensitive/test/mock/MockHelper.java b/src/test/java/com/lzhpo/sensitive/test/mock/MockHelper.java index d3b0de1..3396523 100644 --- a/src/test/java/com/lzhpo/sensitive/test/mock/MockHelper.java +++ b/src/test/java/com/lzhpo/sensitive/test/mock/MockHelper.java @@ -39,6 +39,12 @@ public static SensitiveEntity sensitive() { .password("123456") .carLicense("粤A66666") .bankCard("9988002866797031") + .ipv4("192.0.2.1") + .ipv6("2001:0db8:86a3:08d3:1319:8a2e:0370:7344") + .firstMask("123456789") + .clearToEmpty("123456") + .clearToNull("12345") + .bankCard("9988002866797031") .keepLength1("1234") .handler1("12345") .filterWords1("卧槽,他妈的,我去你大爷的,草泥马")