Class FileEncryptor

java.lang.Object
ml.karmaconfigs.api.common.utils.security.file.FileEncryptor

public final class FileEncryptor extends Object
File encryption utilities
  • Constructor Details

    • FileEncryptor

      public FileEncryptor(File tar, String key)
      Initialize the file encryptor
      Parameters:
      tar - the target file
      key - the file key
    • FileEncryptor

      public FileEncryptor(Path tar, String key)
      Initialize the file encryptor
      Parameters:
      tar - the target file
      key - the file key
  • Method Details

    • encrypt

      public boolean encrypt()
      Encrypt the file
      Returns:
      if the file could be encrypted
    • decrypt

      public boolean decrypt()
      Decrypt the file
      Returns:
      if the file could be decrypted