Placeholders
A hidden value becomes a placeholder such as [[EMAIL_K7Q2M]]; Halto puts the real value back only where it may go.
const safe = await halto.protect("Hi, this is Anna (anna@example.com)…", {
type: "email",
});
// safe.content: "Hi, this is [[NAME_P4X9A]] ([[EMAIL_K7Q2M]])…"- The form is
[[KIND_XXXXX]]: five letters and digits without 0, O, 1 or I, so a model copying it can't confuse them. - Halto keeps the real value, encrypted with your workspace's own key, for 24 hours by default (you choose, up to 7 days).
- That is what lets Halto put it back where it may go: in
final_paramsof a check.
Kinds
| Kind | What it hides | Example |
|---|---|---|
EMAIL | email addresses | anna@example.com → [[EMAIL_K7Q2M]] |
PHONE | phone numbers | +1 415 555 0132 → [[PHONE_8XH3D]] |
NAME | people's names | Anna Weber → [[NAME_P4X9A]] |
ADDRESS | postal addresses | 12 Market Street, San Francisco → [[ADDRESS_R2V7N]] |
IBAN | bank account numbers | DE89 3704 0044 0532 0130 00 → [[IBAN_T5W9C]] |
CARD | payment card numbers | 4242 4242 4242 4242 → [[CARD_M6Q4Z]] |
ID | ID and document numbers, usernames and IP addresses | passport C01X00T47 → [[ID_J3K8P]] |
DOB | dates of birth | born 12 March 1984 → [[DOB_V9L2H]] |
CONF | confidential business information | a project name you listed as confidential → [[CONF_Y7N4B]] |
SECRET | passwords and secret keys | a password or an API key → [[SECRET_H2G6X]] |