Class ChaosOptionsBuilder.Builder

java.lang.Object
org.refcodes.security.alt.chaos.ChaosOptionsBuilder.Builder
Enclosing class:
ChaosOptionsBuilder

public static final class ChaosOptionsBuilder.Builder extends Object
Builder to build ChaosOptionsBuilder.
  • Field Details

    • rndPrefixSize

      public short rndPrefixSize
  • Method Details

    • withXorNext

      public ChaosOptionsBuilder.Builder withXorNext(boolean isXorNext)
      Enables or disables the ChaosOptionsBuilder.isXorNext() option.
      Parameters:
      isXorNext - True in case XOR obfuscation is to be applied.
      Returns:
      This builder as of the builder pattern.
    • withMutateS

      public ChaosOptionsBuilder.Builder withMutateS(boolean isMutateS)
      Enables or disables the ChaosOptionsBuilder.isMutateS() option.
      Parameters:
      isMutateS - True in case MUTATION obfuscation is to be applied.
      Returns:
      This builder as of the builder pattern.
    • withSalted

      public ChaosOptionsBuilder.Builder withSalted(boolean isSalted)
      Enables or disables the ChaosOptionsBuilder.isSalted() option.
      Parameters:
      isSalted - True in case MUTATION obfuscation is to be applied.
      Returns:
      This builder as of the builder pattern.
    • withRndPrefixSize

      public ChaosOptionsBuilder.Builder withRndPrefixSize(short aRndPrefixSize)
      Sets the prefix size for the ChaosOptionsBuilder.getRndPrefixSize() option. Valid values range from {1..256} representable by one byte as of {0x00..0xFF}.
      Parameters:
      aRndPrefixSize - The size of the random bytes in case the PREFIX option is to be applied.
      Returns:
      This builder as of the builder pattern.
    • build

      public ChaosOptionsBuilder build()
      Determines whether an ADD operation of the ChaosKey's S value is to be applied with the current byte value (using signed bytes -128 to +127).
      Returns:
      the chaos metrics builder