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 Python
1.0.0
py rs ts
13 tests
Apache-2.0
crypto.sha256
The SHA-256 digest of a byte string (FIPS 180-4), in pure code that also runs in the browser.
sha256 in Python
1.0.0
py rs ts
13 tests
Apache-2.0
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 Python
1.0.0
py rs ts
12 tests
Apache-2.0
crypto.hmac-sha1
HMAC-SHA1 of a message under a secret key (RFC 2104, RFC 2202), the MAC under HOTP and TOTP codes.
hmac_sha1 in Python
1.0.0
py rs ts
14 tests
Apache-2.0
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 Python
1.0.0
py rs ts
14 tests
Apache-2.0
crypto.sha1
The SHA-1 digest of a byte string (FIPS 180-4), for HMAC-SHA1 in HOTP/TOTP codes; not for new signatures.
sha1 in Python
1.0.0
py rs ts
14 tests
Apache-2.0
encoding.utf8
Text to UTF-8 bytes and strictly back (RFC 3629), so hashing and signing see the same bytes in every language.
A group of 2: utf8_encode, utf8_decode
1.0.0
py rs ts
25 tests
Apache-2.0
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
Apache-2.0
auth.recovery-codes
Two-factor recovery codes: generate from caller entropy, hash for storage, and verify-and-consume as a pure step.
A group of 4: generate_recovery_codes, normalise_recovery_code, hash_recovery_code, consume_recovery_code
1.0.0
py rs ts
39 tests
Apache-2.0
auth.totp
Authenticator-app two-factor codes (TOTP RFC 6238, HOTP RFC 4226): secret, QR URI, codes, verify with window and drift.
A group of 5: totp_secret, totp_uri, hotp_code, totp_code, verify_totp
1.0.0
py rs ts
80 tests
Apache-2.0
auth.email-token
Hashed single-use tokens for email verification, password reset and magic links, with expiry, as pure steps.
A group of 4: generate_email_token, hash_email_token, check_email_token, consume_email_token
1.0.0
py rs ts
43 tests
Apache-2.0
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
Apache-2.0
payments.stripe-checkout Integration · does I/O TypeScript only
Start a Stripe Checkout session and verify Stripe's signed webhooks, with a local stand-in for development.
Not available in Python
1.1.0
ts
41 tests
MIT
auth.oauth-sign-in Integration · does I/O TypeScript only
Sign users in with OpenID Connect or GitHub (authorisation code + PKCE), and keep them in a signed session cookie.
Not available in Python
1.0.0
ts
54 tests
MIT
storage.signed-url Integration · does I/O TypeScript only
Signed URLs for a browser to upload a file straight to S3 or Google Cloud Storage, and to download it.
Not available in Python
1.0.0
ts
25 tests
MIT
math.pow
base to the power exponent from + - * / only, exact by squaring for whole exponents, identical in every language.
pow in Python
1.0.0
py rs ts
16 tests
Apache-2.0
money.amount
A currency-tagged monetary amount held in integer minor units.
money in Python
1.0.2
py rs ts
17 tests
Apache-2.0
math.exp
e to the power x from + - * / only, so TypeScript, Python and Rust return the same double for the same input.
exp in Python
1.0.1
py rs ts
10 tests
Apache-2.0
money.compare
Compare two amounts of one currency, refusing to compare across currencies; min, max and clamp too.
A group of 4: compare_money, min_money, max_money, clamp_money
2.0.0
py rs ts
39 tests
Apache-2.0
react.form.money-field React ^19 · TypeScript only
A money input with its currency symbol, locale separators and min/max, read and checked by form.money-input.
Not available in Python
1.0.0
ts
14 tests
Apache-2.0
money.add
Add, subtract and negate monetary amounts, refusing to mix currencies.
add_money in Python
1.0.1
py rs ts
12 tests
Apache-2.0
money.convert
Convert an amount to another currency at a supplied exact rate, with an explicit rounding mode.
convert_money in Python
1.0.0
py rs ts
19 tests
Apache-2.0
energy.climate-change-levy
Climate Change Levy on a business supply of electricity, gas, LPG or solid fuel, at the main rate in force on the date.
climate_change_levy in Python
1.0.2
py rs ts
20 tests
Apache-2.0 AND OGL-UK-3.0
math.clamp
Clamp an integer to an inclusive range, refusing a range whose bounds are the wrong way round.
clamp in Python
1.0.0
py rs ts
12 tests
Apache-2.0
math.big-integer
Exact integer arithmetic of any size, on decimal strings, for powers and products that overflow 64 bits.
calculate_big_integer in Python
1.0.0
py rs ts
24 tests
Apache-2.0
money.currency-digits
How many decimal places a currency's minor unit has, from the ISO 4217 list.
currency_digits in Python
1.0.0
py rs ts
14 tests
Apache-2.0
construction.cis-deduction
Construction Industry Scheme deduction (0, 20 or 30%) on the labour part of a subcontractor payment.
cis_deduction in Python
1.0.2
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
math.fractional-power
Raise a positive decimal to a fractional power, (1.199)^(31/365), identically in every language.
fractional_power in Python
1.0.0
py rs ts
19 tests
Apache-2.0
validation.lei
Check a 20-character Legal Entity Identifier against its ISO 17442 / ISO 7064 MOD 97-10 check digits.
validate_lei in Python
1.0.0
py rs ts
14 tests
Apache-2.0
math.round-div
Integer division with an explicit rounding mode, for money arithmetic that must not drift.
round_div in Python
1.0.0
py rs ts
14 tests
Apache-2.0
inventory.valuation-fifo
FIFO stock valuation and cost of sales from a stock movement ledger, in exact money.
fifo_valuation in Python
1.0.0
py rs ts
18 tests
Apache-2.0