{title:'Modded/Encoded Entries', updated:'9.0.0'}

The following method can be used to associates entry modifiers to a config:

- {@link oaj.config.Config.Builder}
  - {@link oaj.config.Config.Builder#mods(Mod...) mods(Mod...)}

Mods are used to modify values before being persisted. This can be used to replace or encode sensitive information. They are denoted by a single character that gets appended between angle brackets on the property name (e.g. key<X>). Multiple modifiers can be denoted by multiple characters (e.g. key<XYZ>) and are applied/removed in the order denoted.

The framework comes built-in with a simple {@link oaj.config.mod.XorEncodeMod xor-encode} mod tied to the '*' character. The following shows how it is used:

| [MyHost] | url = http://localhost:9080/foo | user = me | password<*> = {AwwJVhwUQFZEMg==}

Custom encoders can be used to provide your own encoding support by implementing the {@link oaj.config.mod.Mod} class.

- {@link oaj.config.mod.Mod}
  - {@link oaj.config.mod.Mod#apply(String) apply(String)}
  - {@link oaj.config.mod.Mod#remove(String) remove(String)}
  - {@link oaj.config.mod.Mod#isApplied(String) isApplied(String)}

Unmodified values are encoded when the file is saved using the {@link oaj.config.Config#commit()} method. They can also be encoded immediately by calling {@link oaj.config.Config#applyMods()} which can typically be done during JVM startup to immediately encode any unencoded passwords in the file.