Security & encoding
Passwords, hashes, test card numbers, random bytes, Base64 and colors. See all field types and the options every field takes.
password
Random password with at least one character of each enabled class.
| Parameter | Values | Default | Description |
|---|---|---|---|
length |
integer | 16 |
Length in characters. |
lower |
boolean | — | Include a-z. |
upper |
boolean | — | Include A-Z. |
numeric |
boolean | — | Include 0-9. |
special |
boolean | — | Include punctuation. |
space |
boolean | — | Include spaces. |
Also takes the common options and textual constraints.
- { name: password, type: password, length: 12, special: false, lower: true, upper: true, numeric: true }hash
Digest of an earlier field or of a template. Test data only: never describe md4/md5 values as secure.
| Parameter | Values | Default | Description |
|---|---|---|---|
algorithm |
md4, md5, sha256, sha384, sha512 |
— | Required. Digest algorithm. |
sourceField |
field name | — | Earlier field to hash. Exactly one of sourceField or template is required. |
template |
text | — | Text to hash, with {{field}} placeholders. |
encoding |
hex, base64, base64url |
hex |
How the digest is written. |
Also takes the common options and textual constraints.
- { name: email, type: email }
- { name: email_sha256, type: hash, algorithm: sha256, sourceField: email }creditCard
16-digit test card number starting with 999999, Luhn-valid and never a real card.
Also takes the common options and textual constraints.
- { name: card, type: creditCard }base64
Standard Base64 of random bytes.
| Parameter | Values | Default | Description |
|---|---|---|---|
length |
integer | 16 |
Number of random bytes before encoding. |
Also takes the common options and textual constraints.
- { name: nonce, type: base64, length: 24 }binary
Random bytes, encoded as text.
| Parameter | Values | Default | Description |
|---|---|---|---|
bytes |
integer | — | Exact byte count. Exclusive with minBytes/maxBytes. |
minBytes |
integer | 1 |
Minimum byte count. |
maxBytes |
integer | 32 |
Maximum byte count. |
encoding |
base64, base64url, hex |
base64 |
How the bytes are written. |
Also takes the common options and textual constraints.
- { name: payload, type: binary, bytes: 32, encoding: hex }color
Color value. rgb, rgba and cmyk are arrays in JSON and compact text elsewhere.
| Parameter | Values | Default | Description |
|---|---|---|---|
format |
hex, rgb, rgba, hsl, hsla, cmyk |
hex |
hex writes #A3F2C1. |
palette |
safe |
— | safe restricts to the 216 web-safe colors. |
Also takes the common options and textual constraints.
- { name: theme, type: color, format: hex }