Class MConsoleEncrypter

java.lang.Object
com.isode.dsapi.profile.MConsoleEncrypter
All Implemented Interfaces:
BindProfileList.ISettingsEncrypter

public class MConsoleEncrypter extends Object implements BindProfileList.ISettingsEncrypter
This class should be used when loading bind profiles for MConsole, so that data in the bind profile which is sensitive is properly encrypted/decrypted using the bind profile passphrase.
Since:
15.2
  • Field Details

  • Constructor Details

    • MConsoleEncrypter

      public MConsoleEncrypter()
  • Method Details

    • settingReadFromFile

      public List<BindProfileList.StringSection> settingReadFromFile(String settingKey, String value)
      A "setting" has been read from the BindProfile file, and we are being the opportunity to see if the value requires any decryption
      Specified by:
      settingReadFromFile in interface BindProfileList.ISettingsEncrypter
      Parameters:
      settingKey - the name of the key, will not be null
      value - the value, will not be null.
      Returns:
      a list of StringSections that need decrypting. This may be null, or an empty list, in which case no decryption will be performed
    • multiSettingReadFromFile

      public List<BindProfileList.StringSection> multiSettingReadFromFile(String multiSettingKey, String value)
      A "multisetting" has been read from the BindProfile file, and we are being the opportunity to see if the value requires any decryption
      Specified by:
      multiSettingReadFromFile in interface BindProfileList.ISettingsEncrypter
      Parameters:
      multiSettingKey - the name of the key, will not be null.
      value - the value, will not be null.
      Returns:
      a list of StringSections that need decrypting. This may be null, or an empty list, in which case no decryption will be performed
    • settingToBeWritten

      public List<BindProfileList.StringSection> settingToBeWritten(String settingKey, String value)
      A "setting" is going to be written to the BindProfile file, and we are being the opportunity to see if the value requires any encryption
      Specified by:
      settingToBeWritten in interface BindProfileList.ISettingsEncrypter
      Parameters:
      settingKey - the name of the key, will not be null
      value - the value, will not be null.
      Returns:
      a list of StringSections that need encrypting. This may be null, or an empty list, in which case no encryption will be performed
    • multiSettingToBeWritten

      public List<BindProfileList.StringSection> multiSettingToBeWritten(String multiSettingKey, String value)
      A "multisetting" is going to be written the BindProfile file, and we are being given the opportunity to see if the value requires any encryption
      Specified by:
      multiSettingToBeWritten in interface BindProfileList.ISettingsEncrypter
      Parameters:
      multiSettingKey - the name of the key, will not be null
      value - the value, will not be null.
      Returns:
      a list of StringSections that need encrypting. This may be null, or an empty list, in which case no encryption will be performed
    • attributeReadFromFile

      public List<BindProfileList.StringSection> attributeReadFromFile(String key, String value)
      An attribute key/value pair has been read from the BindProfile file, and we are given the opportunity to see if it needs decryption.
      Specified by:
      attributeReadFromFile in interface BindProfileList.ISettingsEncrypter
      Parameters:
      key - the name of the key which will not be null
      value - the value which will not be null
      Returns:
      a list of StringSections that need decrypting. This may be null, or an empty list, in which case no decryption will be performed
    • attributeToBeWritten

      public List<BindProfileList.StringSection> attributeToBeWritten(String key, String value)
      An attribute key/value pair is about to be written to the BindProfile file, and we are given the opportunity to see if it needs encryption.
      Specified by:
      attributeToBeWritten in interface BindProfileList.ISettingsEncrypter
      Parameters:
      key - the name of the key, will not be null
      value - the value, will not be null.
      Returns:
      a list of StringSections that need encrypting. This may be null, or an empty list, in which case no encryption will be performed