Enum Class JsonMaskerAlgorithmType
- All Implemented Interfaces:
Serializable,Comparable<JsonMaskerAlgorithmType>,Constable
SINGLE_TARGET_LOOP loops over the target key set and executes the single-target
key masking algorithm for each key.
(time complexity cN * K, where N is the message input size, K the target key set size, and c is some constant)
KEYS_CONTAIN uses a dedicated multi-target algorithm by looking for a
JSON key and checking whether the target key set contains this key.
(time complexity cN, where N is the message input size and c is some constant)
Note: for small target key set (1-2 entries), the SINGLE_TARGET_LOOP might
actually be faster for multi-target masking since the constant is slightly smaller.
The main reason this library contains both algorithm is to support automated fuzzing testing (randomly generating a huge number input messages and verifying that both algorithms result in an equal output to catch bugs).
Default value: KEYS_CONTAIN
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonMaskerAlgorithmTypeReturns the enum constant of this class with the specified name.static JsonMaskerAlgorithmType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PATH_AWARE_KEYS_CONTAIN
-
SINGLE_TARGET_LOOP
-
KEYS_CONTAIN
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-