Package org.refcodes.security.alt.chaos
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 buildChaosOptionsBuilder
.
-
-
Field Summary
Fields Modifier and Type Field Description short
rndPrefixSize
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChaosOptionsBuilder
build()
Determines whether an ADD operation of theChaosKey
's S value is to be applied with the current byte value (using signed bytes -128 to +127).ChaosOptionsBuilder.Builder
withMutateS(boolean isMutateS)
Enables or disables theChaosOptionsBuilder.isMutateS()
option.ChaosOptionsBuilder.Builder
withRndPrefixSize(short aRndPrefixSize)
Sets the prefix size for theChaosOptionsBuilder.getRndPrefixSize()
option.ChaosOptionsBuilder.Builder
withSalted(boolean isSalted)
Enables or disables theChaosOptionsBuilder.isSalted()
option.ChaosOptionsBuilder.Builder
withXorNext(boolean isXorNext)
Enables or disables theChaosOptionsBuilder.isXorNext()
option.
-
-
-
Method Detail
-
withXorNext
public ChaosOptionsBuilder.Builder withXorNext(boolean isXorNext)
Enables or disables theChaosOptionsBuilder.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 theChaosOptionsBuilder.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 theChaosOptionsBuilder.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 theChaosOptionsBuilder.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 theChaosKey
's S value is to be applied with the current byte value (using signed bytes -128 to +127).- Returns:
- the chaos metrics builder
-
-