MaskingStrategy class

Strategy for masking strings while preserving limited structure.

Constructors

MaskingStrategy({String maskChar = '*', int keepStart = 1, int keepEnd = 1, int minMasked = 2})
Creates a masking strategy describing how many characters to keep visible.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
keepEnd → int
Number of characters preserved at the end.
final
keepStart → int
Number of characters preserved at the start.
final
maskChar → String
Character used to mask hidden portions.
final
minMasked → int
Minimum number of masked characters enforced.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

mask(String input) → String
Masks input completely when preserving both ends would hide fewer than minMasked characters.
maskCard(String input) → String
Special case for card-like sequences: mask all but last 4 digits and keep spacing where possible.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited