@Test public void testSha1Mask() throws Exception { String hash = DataMask.mask("test", SensitiveType.Hash); System.out.println(hash); String salt = HashMask.getSalt(); String encrypt =EncodeUtil.encodeHex(HashUtil.sha1("test"+salt)); assertThat(hash).isNotNull().isEqualTo(encrypt); }
public static String mask(String source) { try { return mask(source, SensitiveType.Default); } catch (Exception e) { return source; } }
DataMask { public static String mask(String source) { try { return mask(source, SensitiveType.Default); } catch (Exception e) { return source; } } }
DataMask { public static String mask(String source) { try { return mask(source, SensitiveType.Default); } catch (Exception e) { return source; } }  }
DataMask { public static String mask(String source) { try { return mask(source, SensitiveType.Default); } catch (Exception e) { return source; } }  static void setHashSalt(String salt); static String mask(String source); static String mask(String source, SensitiveType type); static String mask(String source,MaskStrategy strategy,int...param); static String toJSONString(Object object); static String toString(Object object); }
DataMask { public static String mask(String source) { try { return mask(source, SensitiveType.Default); } catch (Exception e) { return source; } }  static void setHashSalt(String salt); static String mask(String source); static String mask(String source, SensitiveType type); static String mask(String source,MaskStrategy strategy,int...param); static String toJSONString(Object object); static String toString(Object object);  }