RedactionContext class final
Provides redaction helpers and configuration to strategies at call-time.
Acts as a mediator between the tree-walking engine and pluggable strategies, exposing only the capabilities strategies need without coupling them to walker internals.
Constructors
-
RedactionContext({required String placeholder, required bool redactBinary, required bool redactBase64, required Set<
String> sensitiveKeysLower, required List<RegExp> sensitiveKeyPatterns, required Set<String> fullyMaskedKeyNamesLower, required bool isIgnoredValue(String value), required bool isIgnoredKey(String lowerKeyName), required String maskString(String value, {String? keyName}), required String binaryPlaceholder(int length), required String base64Placeholder(int length), required Uint8List redactUint8List(Uint8List data), required bool looksLikeAuthorizationValue(String value), required bool isLikelyBase64(String value), required bool isProbablyBinaryString(String value)}) -
const
Properties
- base64Placeholder → String Function(int length)
-
final
- binaryPlaceholder → String Function(int length)
-
final
-
fullyMaskedKeyNamesLower
→ Set<
String> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isIgnoredKey → bool Function(String lowerKeyName)
-
final
- isIgnoredValue → bool Function(String value)
-
final
- isLikelyBase64 → bool Function(String value)
-
final
- isProbablyBinaryString → bool Function(String value)
-
final
- looksLikeAuthorizationValue → bool Function(String value)
-
final
- maskString → String Function(String value, {String? keyName})
-
final
- placeholder → String
-
final
- redactBase64 → bool
-
final
- redactBinary → bool
-
final
- redactUint8List → Uint8List Function(Uint8List data)
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sensitiveKeyPatterns
→ List<
RegExp> -
final
-
sensitiveKeysLower
→ Set<
String> -
final
Methods
-
isSensitiveKey(
String? keyName) → bool -
Whether
keyNameis classified as sensitive (case-insensitive). -
isSensitiveKeyLower(
String lowerKey) → bool - Same as isSensitiveKey but expects an already-lowercased key.
-
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