Class XorEncodeMod

java.lang.Object
org.apache.juneau.config.mod.Mod
org.apache.juneau.config.mod.XorEncodeMod

public class XorEncodeMod extends Mod
Simply XOR+Base64 encoder for obscuring passwords and other sensitive data in INI config files.

This is not intended to be used as strong encryption.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • apply

      public String apply(String value)
      Description copied from class: Mod
      Applies this modification to the specified entry value.

      Will only be called if Mod.isApplied(String) returns false.

      Overrides:
      apply in class Mod
      Parameters:
      value - The entry value being written. Will never be null.
      Returns:
      The modified value.
    • remove

      public String remove(String value)
      Description copied from class: Mod
      Removes this modification to the specified entry value.

      Will only be called if Mod.isApplied(String) returns true.

      Overrides:
      remove in class Mod
      Parameters:
      value - The entry value being read. Will never be null.
      Returns:
      The unmodified value.
    • isApplied

      public boolean isApplied(String value)
      Description copied from class: Mod
      Detects whether this modification has been applied.
      Overrides:
      isApplied in class Mod
      Parameters:
      value - The entry value being tested. Will never be null.
      Returns:
      true if the modification has been made to the entry.