接口 IUSymmetricEncyrpt

所有已知实现类:
UAes, UDes

public interface IUSymmetricEncyrpt
Symmetric Encrypt/ Decrypt Interface
  • 方法详细资料

    • encrypt

      String encrypt(String source, String charsetName) throws Exception
      加密
      参数:
      source - 原文
      charsetName - 编码格式,例如 UTF8, GBK ...
      返回:
      密文,用base64 编码
      抛出:
      Exception
    • encrypt

      String encrypt(String source) throws Exception
      加密
      参数:
      source - UTF8原文
      返回:
      密文,用base64 编码
      抛出:
      Exception
    • decrypt

      String decrypt(String base64Encrypt, String charsetName) throws Exception
      解密
      参数:
      base64Encrypt - 加密的base64字符串
      charsetName - 转成字符串的 编码
      返回:
      明码
      抛出:
      Exception
    • decrypt

      String decrypt(String base64Encrypt) throws Exception
      解码,转换为utf8字符串
      参数:
      base64Encrypt - 加密的base64字符串
      返回:
      明码
      抛出:
      Exception
    • encryptBytes

      byte[] encryptBytes(byte[] sourceBytes) throws Exception
      加密,以byte[]明文输入,byte[]密文输出 encrypt
      参数:
      sourceBytes - 明
      返回:
      密文
      抛出:
      Exception
    • decryptBytes

      byte[] decryptBytes(byte[] bytesEncryption) throws Exception
      解密,以byte[]密文输入,以byte[]明文输出
      参数:
      bytesEncryption - 密文
      返回:
      明文
      抛出:
      Exception