Interface SecDispatcher

All Known Implementing Classes:
DefaultSecDispatcher

public interface SecDispatcher
This component decrypts a string, passed to it using various dispatchers.
Author:
Oleg Gusakov
  • Field Details

  • Method Details

    • availableDispatchers

      Set<DispatcherMeta> availableDispatchers()
      Returns the set of available dispatcher metadata, never null.
    • encrypt

      Encrypt given plaintext string.
      Parameters:
      str - the plaintext to encrypt
      attr - the attributes, may be null
      Returns:
      encrypted string
      Throws:
      SecDispatcherException - in case of problem
      IOException
    • decrypt

      Decrypt given encrypted string.
      Parameters:
      str - the encrypted string
      Returns:
      decrypted string
      Throws:
      SecDispatcherException - in case of problem
      IOException
    • isAnyEncryptedString

      default boolean isAnyEncryptedString(String str)
      Returns true if passed in string adheres to "encrypted string" format (current or legacy).
      Since:
      4.0.1
    • isEncryptedString

      boolean isEncryptedString(String str)
      Returns true if passed in string adheres "encrypted string" format.
    • isLegacyEncryptedString

      boolean isLegacyEncryptedString(String str)
      Returns true if passed in string adheres to "legacy encrypted string" format.
    • readConfiguration

      SettingsSecurity readConfiguration(boolean createIfMissing) throws IOException
      Reads the effective configuration, eventually creating new instance if not present.
      Parameters:
      createIfMissing - If true, it will create a new empty instance
      Returns:
      the configuration, of null if it does not exist in createIfMissing is false
      Throws:
      IOException - In case of IO problem
    • writeConfiguration

      void writeConfiguration(SettingsSecurity configuration) throws IOException
      Writes the effective configuration.
      Parameters:
      configuration - The configuration to write, may not be null
      Throws:
      IOException - In case of IO problem
    • validateConfiguration

      SecDispatcher.ValidationResponse validateConfiguration()
      Performs a "deep validation" and reports the status. If return instance SecDispatcher.ValidationResponse.isValid() is true, configuration is usable.