auth.validate-registration
Validate a sign-up form (email, password, name) in one call, with a message per field, in the browser and the API alike.
validate_registration in Rust
1.0.0
py rs ts
14 tests
auth.validate-login
Check a login form (email, password): the normalised email to look up, or a message for each field to fix.
validate_login in Rust
1.0.0
py rs ts
11 tests
auth.access-token
Issue an API's HS256 access token, read one from an Authorization header, and refuse revoked or superseded ones.
A group of 3: issue_access_token, read_access_token, confirm_access_token
1.0.0
py rs ts
33 tests
auth.validate-password-change
Check a change-password form: current password given and correct, new one meeting the policy and different.
validate_password_change in Rust
1.0.0
py rs ts
15 tests
auth.jwt
Sign, verify and decode HS256 JSON Web Tokens (RFC 7519): signature, algorithm and exp/nbf/iat checked with leeway.
A group of 3: sign_jwt, verify_jwt, decode_jwt
1.0.0
py rs ts
54 tests
auth.bearer-token
The token from an HTTP Authorization header of the form "Bearer <token>" (RFC 6750), or null if it has none.
parse_bearer_token in Rust
1.0.0
py rs ts
18 tests
auth.password-policy
Check a new password against a named policy (NIST SP 800-63B-4 by default): length, common passwords, name and email.
A group of 2: password_policy, check_password
1.0.1
py rs ts
31 tests
auth.password-hash
Hash a password for storage as pbkdf2_sha256$iterations$salt$hash, verify one in constant time, and spot weak hashes.
A group of 3: hash_password, verify_password, password_needs_rehash
1.0.0
py rs ts
36 tests
auth.login-throttle
Allow a login attempt or lock the account out, from its recent failed attempts, with the seconds until it may retry.
login_throttle in Rust
1.0.0
py rs ts
19 tests
auth.normalise-email
Trim an email address and lower-case its domain for storage and lookup, or null if it is not a plausible address.
normalise_email in Rust
1.0.0
py rs ts
12 tests
react.form.password-field React ^19 · TypeScript only
A password input with a Show/Hide button and an optional live checklist of a password policy (GOV.UK password input).
Not available in Rust
1.0.1
ts
22 tests
crypto.pbkdf2-sha256
PBKDF2 with HMAC-SHA256 (RFC 8018): derive a key from a password and salt, slowly, fast enough for a login request.
pbkdf2_sha256 in Rust
1.0.0
py rs ts
14 tests
crypto.hmac-sha256
HMAC-SHA256 of a message under a secret key (RFC 2104, RFC 4231), in pure code that also runs in the browser.
hmac_sha256 in Rust
1.0.0
py rs ts
13 tests
crypto.sha256
The SHA-256 digest of a byte string (FIPS 180-4), in pure code that also runs in the browser.
sha256 in Rust
1.0.0
py rs ts
13 tests
encoding.hex
Bytes to lowercase hexadecimal text and back (RFC 4648 base16), strictly, identically in every language.
A group of 2: hex_encode, hex_decode
1.0.0
py rs ts
25 tests
form.state TypeScript only
A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.
Not available in Rust
1.0.1
ts
40 tests
validation.email
Is this a plausible email address? A documented, pragmatic subset of RFC 5322, not the full grammar.
is_email in Rust
1.0.0
py rs ts
28 tests
validation.iban
Check an IBAN against the ISO 13616 mod-97-10 checksum and the registered length for its country.
is_iban in Rust
1.0.0
py rs ts
22 tests
validation.lei
Check a 20-character Legal Entity Identifier against its ISO 17442 / ISO 7064 MOD 97-10 check digits.
validate_lei in Rust
1.0.0
py rs ts
14 tests
finance.ledger.journal-validate
Check a double-entry journal: debits equal credits, no zero or two-sided lines, one currency, well-formed account codes.
validate_journal in Rust
1.0.0
py rs ts
16 tests
validation.luhn
Check a digit string against the Luhn mod-10 checksum used by payment cards and many identifiers.
is_luhn in Rust
1.0.0
py rs ts
18 tests
text.initials
Initials from a personal name for avatars and signatures: "Jean-Paul Sartre" is "JPS".
initials in Rust
1.0.0
py rs ts
17 tests
validation.bic
Check the format of a SWIFT/BIC code (8 or 11 characters) and split it into its parts.
validate_bic in Rust
1.0.0
py rs ts
15 tests
validation.uk-utr
Check an HMRC Unique Taxpayer Reference's modulus 11 check digit, accepting the K and spacing people type.
validate_uk_utr in Rust
2.0.1
py rs ts
18 tests
crypto.constant-time-equal
Compare two byte strings in time that does not depend on where they differ, for checking MACs and hashes.
constant_time_equal in Rust
1.0.0
py rs ts
12 tests
net.device-validate
Validate one network inventory entry: name, host, ports, optional MAC and subnet, with every problem listed.
validate_device in Rust
1.0.0
py rs ts
17 tests
validation.vin
Check a 17-character vehicle identification number and its check digit; enforced for North American VINs.
validate_vin in Rust
1.0.0
py rs ts
17 tests
insurance.age-banding Unreviewed
Age at policy inception and the rating band it falls in, from a table of age bands.
age_band in Rust
1.0.1
py rs ts
18 tests
net.hostname-validate
Check a host name against RFC 1123 and RFC 952 label rules and length limits, and normalise it.
validate_hostname in Rust
1.0.0
py rs ts
26 tests
subscriptions.ltv-cac
Customer lifetime value, LTV to CAC ratio and CAC payback months from ARPA, gross margin, churn and CAC.
ltv_cac in Rust
1.0.0
py rs ts
14 tests
legal.conflict-name-match Unreviewed
Fuzzy-match a name against existing clients and parties for a conflict check: normalised, token-sorted Jaro-Winkler.
conflict_name_match in Rust
1.0.1
py rs ts
18 tests
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trial_balance in Rust
1.0.0
py rs ts
13 tests
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in Rust
1.0.0
py rs ts
17 tests
todo.item
The to-do item type (Todo, TodoDraft, Recurrence) and its validators, with a message per field.
A group of 2: validate_draft, validate_todo
1.0.0
py rs ts
51 tests
validation.uk-vat-number
Check a UK VAT registration number against HMRC's mod-97 checksum, including the post-2010 9755 variant.
is_uk_vat_number in Rust
1.0.0
py rs ts
22 tests
hospitality.tronc-allocation
Share a tips pool (tronc) between staff by hours worked, points, or hours times points, exactly to the penny.
tronc_allocation in Rust
1.0.0
py rs ts
19 tests