<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
# Anonymization Techniques — API Reference

## Mask PII Fields

```bash
node scripts/agent.js --action mask --input /tmp/dataset.json --fields "email,phone,ssn"
```

## Generalize Values

```bash
node scripts/agent.js --action generalize --input /tmp/dataset.json \
  --field "age" --bin-size 10
```

## Tokenize Identifiers

```bash
node scripts/agent.js --action tokenize --input /tmp/dataset.json \
  --fields "user_id,email"
```

## Assess Re-identification Risk

```bash
node scripts/agent.js --action assess-risk --input /tmp/anonymized.json \
  --quasi-ids "age,zipcode,gender"
```

## Technique Comparison

| Technique | Reversible | Utility | GDPR Status |
|-----------|-----------|---------|-------------|
| Masking | No | Low | Anonymized |
| Generalization | No | Medium | Anonymized |
| Tokenization | Yes (with key) | High | Pseudonymized |
| Suppression | No | Low | Anonymized |
| Noise addition | No | Medium | Anonymized |

## Output Format

```json
{
  "tool": "anonymizer",
  "action": "mask",
  "fields_masked": ["email", "phone", "ssn"],
  "records_processed": 1000
}
```
