Skip to content
Protection Engine

Redact, mask, anonymise, or hash before any model sees the payload

FastPII gives engineering and security teams four explicit protection modes so every AI interaction can be transformed to the level your organisation actually needs.

Protection summary

The Protection Engine sits after sensitive data detection and before provider routing, giving you a clean place to decide which transformations should happen every time.

Four modes

Choose the right transformation for the workflow

Some workloads need full removal, some need readable context, and some need one-way protection for downstream joins or evidence.

Redact

Replace the match with [REDACTED].

Use when nothing from the original value should cross the boundary to a model or downstream log.

Mask

Replace characters while preserving the original shape.

Useful when users need partial readability for support or review without exposing the full identifier.

Anonymise

Swap the value for a stable placeholder replacement.

Keep the semantic role of the data in the prompt while removing the original sensitive content itself.

Hash

Create a SHA256 one-way value.

Hashing is not reversible tokenisation. It is a one-way protection option for joins and traceability without raw exposure.

Implementation detail

Use SHA256 hashing when you need one-way protection

Hash mode is designed for irreversible derivation. It is not reversible tokenisation, and it should be selected only when one-way behaviour is what your workflow requires.

Policy-friendly outputs

  • • Redact for complete removal using [REDACTED].
  • • Mask for character replacement with preserved shape.
  • • Anonymise for placeholder replacement in prompts and logs.
  • • Hash for SHA256 one-way protection.
Protect API
curl https://api.fastpii.com/api/v1/protect \
  -H "Authorization: Bearer $FASTPII_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Customer PESEL 90010112345 asked to update card 4242 4242 4242 4242",
    "mode": "mask"
  }'
Before & after

See how each mode transforms sensitive data

Every mode produces a different output shape. Pick the one that matches your workflow's readability and reversibility needs.

Before

Customer PESEL 90010112345 asked to update card 4242 4242 4242 4242

Redact

After

Customer [REDACTED] asked to update card [REDACTED]

Before

Customer PESEL 90010112345 asked to update card 4242 4242 4242 4242

Mask

After

Customer PESEL 9**********45 asked to update card 4*** **** **** *424

Before

Customer PESEL 90010112345 asked to update card 4242 4242 4242 4242

Anonymise

After

Customer PESEL [PESEL] asked to update card [CARD]

Before

Customer PESEL 90010112345 asked to update card 4242 4242 4242 4242

Hash

After

Customer PESEL a1b2c3... asked to update card d4e5f6...

Deploy protection

Stop raw sensitive values from reaching downstream models

FastPII lets you decide how much context to preserve while still enforcing a consistent protection policy before AI traffic leaves your application.