Interface Factory


public interface Factory
加解密服务提供
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    decrypt(String key, byte[] content)
    数据解密 1.
    byte[]
    encrypt(String key, byte[] content)
    数据加密 1.
  • Method Details

    • encrypt

      byte[] encrypt(String key, byte[] content)
      数据加密 1. 私钥加密 2. 公钥加密
      Parameters:
      key - 密钥,字符串,分割 示例: 5c3,5c3,PrivateKey
      content - 需要加密的内容
      Returns:
      加密结果
    • decrypt

      byte[] decrypt(String key, byte[] content)
      数据解密 1. 公钥解密 2. 私钥解密
      Parameters:
      key - 密钥, 字符串使用,分割 格式: 私钥,公钥,类型 示例: 5c3,5c3,PrivateKey 1. 私钥加密,公钥解密 2. 公钥加密,私钥解密
      content - 需要解密的内容
      Returns:
      解密结果