接口 ISensitive

所有已知实现类:
DefaultSensitive, NoneSensitive

public interface ISensitive
敏感数据加解密接口
  • 方法详细资料

    • encrypt

      String encrypt(Object bean, String original)
      保存时的加密方法
      参数:
      bean - bean
      original - 原文
      返回:
      加密后的字符串
    • decrypt

      String decrypt(Object bean, String ciphertext)
      查询时的解密方法
      参数:
      bean - bean
      ciphertext - 数据库存储的密文
      返回:
      返回查询的方法
    • normal

      default String normal(Object bean, String ciphertext)
      不解密时返回的方法, 默认返回null替换密文
      参数:
      bean - bean
      ciphertext - 数据库存储的密文
      返回:
      返回查询的方法