MaskStrategy

Defines how a Secret-annotated field value is masked when displayed in logs or debug output.

Each strategy offers a different balance between security and debuggability:

  • FULL hides the entire value, suitable for highly sensitive data.

  • PARTIAL reveals a prefix, useful for identifying which key or token is in use.

  • EDGES reveals the first and last characters, helpful for quick visual verification.

Since

1.0

See also

Entries

Link copied to clipboard

Replaces the entire value with asterisks: "superSecret123" becomes "********".

Link copied to clipboard

Reveals the first Secret.visibleChars characters and masks the rest: "superSecret123" becomes "supe********".

Link copied to clipboard

Reveals the first and last characters and masks everything in between: "superSecret123" becomes "s*************3".

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.