Interface EncryptorProvider

All Known Implementing Classes:
BootEncryptorProvider, DirEncryptorProvider, EntryEncryptorProvider, JarEncryptorProvider, JdkEncryptorProvider, NopEncryptorProvider, WrappedEncryptorProvider, ZipEncryptorProvider

public interface EncryptorProvider
加密器
Since:
Java 17+
Author:
Kimi Liu
  • Method Details

    • encrypt

      void encrypt(Key key, File src, File dest) throws IOException
      加密,将目标文件加密输出至目标文件
      Parameters:
      key - 密钥
      src - 源文件
      dest - 目标文件
      Throws:
      IOException - I/O 异常
    • encrypt

      void encrypt(Key key, InputStream in, OutputStream out) throws IOException
      加密,将输入流加密输出至输出流
      Parameters:
      key - 密钥
      in - 输入流
      out - 输出流
      Throws:
      IOException - I/O 异常
    • encrypt

      InputStream encrypt(Key key, InputStream in) throws IOException
      加密,将输入流包装成加密的输入流
      Parameters:
      key - 密钥
      in - 输入流
      Returns:
      加密后的输入流
      Throws:
      IOException - I/O 异常
    • encrypt

      OutputStream encrypt(Key key, OutputStream out) throws IOException
      加密,将输入流包装成加密的输出流
      Parameters:
      key - 密钥
      out - 输出流
      Returns:
      加密后的输出流
      Throws:
      IOException - I/O 异常