Helpers class
Miscellaneous helpers shared across layers: payload sanitization and small math utilities for the risk engine.
Signing/verification lives in CryptoUtils (real HMAC-SHA256, via
package:crypto) rather than here.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Methods
-
clampRisk(
double value) → double -
Clamps
valueinto the inclusive[0.0, 1.0]risk-score range. -
sanitize(
dynamic value) → dynamic - Recursively strips control characters and trims strings within a payload (map, list, or scalar), returning a sanitized deep copy. This is a lightweight defense against injection-style payloads — it does not replace proper output encoding at the data-sink layer.